diff --git a/MagickCore/display.c b/MagickCore/display.c
index 174f044..ece4c11 100644
--- a/MagickCore/display.c
+++ b/MagickCore/display.c
@@ -7785,7 +7785,7 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) ContrastImage(*image,MagickTrue);
+ (void) ContrastImage(*image,MagickTrue,&(*image)->exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
@@ -7800,7 +7800,7 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) ContrastImage(*image,MagickFalse);
+ (void) ContrastImage(*image,MagickFalse,&(*image)->exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
@@ -7838,7 +7838,8 @@
white_point*=(double) (*image)->columns*(*image)->rows/100.0;
}
white_point=(MagickRealType) (*image)->columns*(*image)->rows-white_point;
- (void) ContrastStretchImage(*image,black_point,white_point);
+ (void) ContrastStretchImage(*image,black_point,white_point,
+ &(*image)->exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
@@ -7890,7 +7891,7 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) NormalizeImage(*image);
+ (void) NormalizeImage(*image,&(*image)->exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
diff --git a/MagickCore/effect.c b/MagickCore/effect.c
index e2366b0..a1ef4e4 100644
--- a/MagickCore/effect.c
+++ b/MagickCore/effect.c
@@ -2468,7 +2468,7 @@
preview_image=CloneImage(thumbnail,0,0,MagickTrue,exception);
if (preview_image != (Image *) NULL)
for (x=0; x < i; x++)
- (void) ContrastImage(preview_image,MagickTrue);
+ (void) ContrastImage(preview_image,MagickTrue,exception);
(void) FormatLocaleString(label,MaxTextExtent,"contrast (%.20g)",
(double) i+1);
break;
@@ -2479,7 +2479,7 @@
if (preview_image == (Image *) NULL)
break;
for (x=0; x < i; x++)
- (void) ContrastImage(preview_image,MagickFalse);
+ (void) ContrastImage(preview_image,MagickFalse,exception);
(void) FormatLocaleString(label,MaxTextExtent,"+contrast (%.20g)",
(double) i+1);
break;
diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c
index 6f5b50c..5a05206 100644
--- a/MagickCore/enhance.c
+++ b/MagickCore/enhance.c
@@ -215,8 +215,8 @@
double
alpha,
- intercept,
coefficients[2],
+ intercept,
slope;
MagickBooleanType
@@ -288,11 +288,6 @@
MagickExport MagickBooleanType ClutImage(Image *image,const Image *clut_image,
ExceptionInfo *exception)
{
-#define ClampAlphaPixelChannel(pixel) ClampToQuantum((pixel)->alpha)
-#define ClampBlackPixelChannel(pixel) ClampToQuantum((pixel)->black)
-#define ClampBluePixelChannel(pixel) ClampToQuantum((pixel)->blue)
-#define ClampGreenPixelChannel(pixel) ClampToQuantum((pixel)->green)
-#define ClampRedPixelChannel(pixel) ClampToQuantum((pixel)->red)
#define ClutImageTag "Clut/Image"
CacheView
@@ -826,7 +821,7 @@
% The format of the ContrastImage method is:
%
% MagickBooleanType ContrastImage(Image *image,
-% const MagickBooleanType sharpen)
+% const MagickBooleanType sharpen,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -834,6 +829,8 @@
%
% o sharpen: Increase or decrease image contrast.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static void Contrast(const int sign,Quantum *red,Quantum *green,Quantum *blue)
@@ -864,16 +861,13 @@
}
MagickExport MagickBooleanType ContrastImage(Image *image,
- const MagickBooleanType sharpen)
+ const MagickBooleanType sharpen,ExceptionInfo *exception)
{
#define ContrastImageTag "Contrast/Image"
CacheView
*image_view;
- ExceptionInfo
- *exception;
-
int
sign;
@@ -908,7 +902,6 @@
*/
status=MagickTrue;
progress=0;
- exception=(&image->exception);
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(dynamic,4) shared(progress,status)
@@ -985,7 +978,7 @@
% The format of the ContrastStretchImage method is:
%
% MagickBooleanType ContrastStretchImage(Image *image,
-% const char *levels)
+% const char *levels,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -998,9 +991,11 @@
% o levels: Specify the levels where the black and white points have the
% range of 0 to number-of-pixels (e.g. 1%, 10x90%, etc.).
%
+% o exception: return any errors or warnings in this structure.
+%
*/
MagickExport MagickBooleanType ContrastStretchImage(Image *image,
- const double black_point,const double white_point)
+ const double black_point,const double white_point,ExceptionInfo *exception)
{
#define MaxRange(color) ((MagickRealType) ScaleQuantumToMap((Quantum) (color)))
#define ContrastStretchImageTag "ContrastStretch/Image"
@@ -1011,9 +1006,6 @@
double
intensity;
- ExceptionInfo
- *exception;
-
MagickBooleanType
status;
@@ -1051,7 +1043,6 @@
Form histogram.
*/
status=MagickTrue;
- exception=(&image->exception);
(void) ResetMagickMemory(histogram,0,(MaxMap+1)*sizeof(*histogram));
image_view=AcquireCacheView(image);
for (y=0; y < (ssize_t) image->rows; y++)
@@ -1273,7 +1264,8 @@
/*
Stretch the image.
*/
- if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) || (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
+ if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) ||
+ (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
(image->colorspace == CMYKColorspace)))
image->storage_class=DirectClass;
if (image->storage_class == PseudoClass)
@@ -3269,14 +3261,17 @@
%
% The format of the NormalizeImage method is:
%
-% MagickBooleanType NormalizeImage(Image *image)
+% MagickBooleanType NormalizeImage(Image *image,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
-MagickExport MagickBooleanType NormalizeImage(Image *image)
+MagickExport MagickBooleanType NormalizeImage(Image *image,
+ ExceptionInfo *exception)
{
double
black_point,
@@ -3284,7 +3279,7 @@
black_point=(double) image->columns*image->rows*0.0015;
white_point=(double) image->columns*image->rows*0.9995;
- return(ContrastStretchImage(image,black_point,white_point));
+ return(ContrastStretchImage(image,black_point,white_point,exception));
}
/*
diff --git a/MagickCore/enhance.h b/MagickCore/enhance.h
index fcebceb..b89bd72 100644
--- a/MagickCore/enhance.h
+++ b/MagickCore/enhance.h
@@ -28,8 +28,8 @@
BrightnessContrastImage(Image *,const double,const double,ExceptionInfo *),
ClutImage(Image *,const Image *,ExceptionInfo *),
ColorDecisionListImage(Image *,const char *,ExceptionInfo *),
- ContrastImage(Image *,const MagickBooleanType),
- ContrastStretchImage(Image *,const double,const double),
+ ContrastImage(Image *,const MagickBooleanType,ExceptionInfo *),
+ ContrastStretchImage(Image *,const double,const double,ExceptionInfo *),
EqualizeImage(Image *image),
GammaImage(Image *,const double,ExceptionInfo *),
HaldClutImage(Image *,const Image *),
@@ -40,7 +40,7 @@
LinearStretchImage(Image *,const double,const double),
ModulateImage(Image *,const char *),
NegateImage(Image *,const MagickBooleanType,ExceptionInfo *),
- NormalizeImage(Image *),
+ NormalizeImage(Image *,ExceptionInfo *),
SigmoidalContrastImage(Image *,const MagickBooleanType,const double,
const double);
diff --git a/MagickCore/fx.c b/MagickCore/fx.c
index 834b0b1..7fe94d9 100644
--- a/MagickCore/fx.c
+++ b/MagickCore/fx.c
@@ -648,7 +648,7 @@
edge_image=DestroyImage(edge_image);
if (charcoal_image == (Image *) NULL)
return((Image *) NULL);
- (void) NormalizeImage(charcoal_image);
+ (void) NormalizeImage(charcoal_image,exception);
(void) NegateImage(charcoal_image,MagickFalse,exception);
(void) SetImageType(charcoal_image,GrayscaleType);
return(charcoal_image);
@@ -4078,8 +4078,8 @@
}
sepia_view=DestroyCacheView(sepia_view);
image_view=DestroyCacheView(image_view);
- (void) NormalizeImage(sepia_image);
- (void) ContrastImage(sepia_image,MagickTrue);
+ (void) NormalizeImage(sepia_image,exception);
+ (void) ContrastImage(sepia_image,MagickTrue,exception);
if (status == MagickFalse)
sepia_image=DestroyImage(sepia_image);
return(sepia_image);
@@ -4367,7 +4367,7 @@
blur_image=DestroyImage(blur_image);
if (dodge_image == (Image *) NULL)
return((Image *) NULL);
- (void) NormalizeImage(dodge_image);
+ (void) NormalizeImage(dodge_image,exception);
(void) NegateImage(dodge_image,MagickFalse,exception);
(void) TransformImage(&dodge_image,(char *) NULL,"50%");
sketch_image=CloneImage(image,0,0,MagickTrue,exception);
diff --git a/MagickCore/image.c b/MagickCore/image.c
index f926196..1f8610c 100644
--- a/MagickCore/image.c
+++ b/MagickCore/image.c
@@ -805,6 +805,7 @@
clone_image->magick_columns=image->magick_columns;
clone_image->magick_rows=image->magick_rows;
clone_image->type=image->type;
+ clone_image->sync=image->sync;
clone_image->map=image->map;
clone_image->channel_map=ClonePixelChannelMap(image->channel_map);
(void) CopyMagickString(clone_image->magick_filename,image->magick_filename,
diff --git a/MagickCore/layer.c b/MagickCore/layer.c
index d1b2d43..f767c0d 100644
--- a/MagickCore/layer.c
+++ b/MagickCore/layer.c
@@ -174,13 +174,8 @@
ssize_t
y;
-#if 0
- assert(image1->matte==MagickTrue);
- assert(image2->matte==MagickTrue);
-#endif
-
- if ( bounds->x< 0 ) return(MagickFalse);
-
+ if (bounds->x < 0)
+ return(MagickFalse);
for (y=0; y < (ssize_t) bounds->height; y++)
{
p=GetVirtualPixels(image1,bounds->x,bounds->y+y,bounds->width,1,
diff --git a/MagickCore/magick-config.h b/MagickCore/magick-config.h
index 60334d7..2726a74 100644
--- a/MagickCore/magick-config.h
+++ b/MagickCore/magick-config.h
@@ -12,9 +12,7 @@
/* #undef AUTOTRACE_DELEGATE */
/* Define if coders and filters are to be built as modules. */
-#ifndef MAGICKCORE_BUILD_MODULES
-#define MAGICKCORE_BUILD_MODULES 1
-#endif
+/* #undef BUILD_MODULES */
/* Define if you have the bzip2 library */
#ifndef MAGICKCORE_BZLIB_DELEGATE
@@ -80,9 +78,7 @@
#endif
/* Define if you have FFTW library */
-#ifndef MAGICKCORE_FFTW_DELEGATE
-#define MAGICKCORE_FFTW_DELEGATE 1
-#endif
+/* #undef FFTW_DELEGATE */
/* Location of filter modules */
#ifndef MAGICKCORE_FILTER_PATH
@@ -436,15 +432,15 @@
#endif
/* Define if you have the <lcms2.h> header file. */
-/* #undef HAVE_LCMS2_H */
+#ifndef MAGICKCORE_HAVE_LCMS2_H
+#define MAGICKCORE_HAVE_LCMS2_H 1
+#endif
/* Define if you have the <lcms2/lcms2.h> header file. */
/* #undef HAVE_LCMS2_LCMS2_H */
/* Define if you have the <lcms.h> header file. */
-#ifndef MAGICKCORE_HAVE_LCMS_H
-#define MAGICKCORE_HAVE_LCMS_H 1
-#endif
+/* #undef HAVE_LCMS_H */
/* Define if you have the <lcms/lcms.h> header file. */
/* #undef HAVE_LCMS_LCMS_H */
@@ -1167,9 +1163,7 @@
#endif
/* Define if you have JBIG library */
-#ifndef MAGICKCORE_JBIG_DELEGATE
-#define MAGICKCORE_JBIG_DELEGATE 1
-#endif
+/* #undef JBIG_DELEGATE */
/* Define if you have JPEG version 2 "Jasper" library */
#ifndef MAGICKCORE_JP2_DELEGATE
@@ -1198,9 +1192,7 @@
#endif
/* Define if you have LQR library */
-#ifndef MAGICKCORE_LQR_DELEGATE
-#define MAGICKCORE_LQR_DELEGATE 1
-#endif
+/* #undef LQR_DELEGATE */
/* Define if using libltdl to support dynamically loadable modules */
#ifndef MAGICKCORE_LTDL_DELEGATE
@@ -1212,7 +1204,7 @@
/* Define to the system default library search path. */
#ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/xulrunner-2"
+#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
#endif
/* The archive extension */
@@ -1263,9 +1255,7 @@
/* #undef NO_MINUS_C_MINUS_O */
/* Define if you have OPENEXR library */
-#ifndef MAGICKCORE_OPENEXR_DELEGATE
-#define MAGICKCORE_OPENEXR_DELEGATE 1
-#endif
+/* #undef OPENEXR_DELEGATE */
/* Define to the address where bug reports for this package should be sent. */
#ifndef MAGICKCORE_PACKAGE_BUGREPORT
@@ -1320,9 +1310,7 @@
#endif
/* Define if you have RSVG library */
-#ifndef MAGICKCORE_RSVG_DELEGATE
-#define MAGICKCORE_RSVG_DELEGATE 1
-#endif
+/* #undef RSVG_DELEGATE */
/* Define to the type of arg 1 for `select'. */
#ifndef MAGICKCORE_SELECT_TYPE_ARG1
@@ -1459,9 +1447,7 @@
/* Define if you have WEBP library */
-#ifndef MAGICKCORE_WEBP_DELEGATE
-#define MAGICKCORE_WEBP_DELEGATE 1
-#endif
+/* #undef WEBP_DELEGATE */
/* Define to use the Windows GDI32 library */
/* #undef WINGDI32_DELEGATE */
@@ -1470,9 +1456,7 @@
/* #undef WITH_DMALLOC */
/* Define if you have WMF library */
-#ifndef MAGICKCORE_WMF_DELEGATE
-#define MAGICKCORE_WMF_DELEGATE 1
-#endif
+/* #undef WMF_DELEGATE */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
diff --git a/MagickCore/threshold.c b/MagickCore/threshold.c
index 7ce060e..9b17ebd 100644
--- a/MagickCore/threshold.c
+++ b/MagickCore/threshold.c
@@ -343,8 +343,7 @@
% with the 'threshold' value for both the black_point and the white_point.
%
*/
-MagickExport MagickBooleanType BilevelImage(Image *image,
- const double threshold)
+MagickExport MagickBooleanType BilevelImage(Image *image,const double threshold)
{
#define ThresholdImageTag "Threshold/Image"
diff --git a/MagickCore/version.h b/MagickCore/version.h
index e6a5d69..b0af119 100644
--- a/MagickCore/version.h
+++ b/MagickCore/version.h
@@ -27,14 +27,14 @@
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision "exported"
+#define MagickSVNRevision "4982"
#define MagickLibVersion 0x700
#define MagickLibVersionText "7.0.0"
#define MagickLibVersionNumber 5,0,0
#define MagickLibAddendum "-0"
#define MagickLibInterface 5
#define MagickLibMinInterface 5
-#define MagickReleaseDate "2011-08-10"
+#define MagickReleaseDate "2011-08-16"
#define MagickChangeDate "20110801"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#if defined(MAGICKCORE_OPENMP_SUPPORT)