From: cristy Date: Mon, 26 Sep 2011 17:29:10 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6950 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f07f70417e8a423f7f37d92cc84d85e114555ca;p=imagemagick --- diff --git a/MagickCore/magick-config.h b/MagickCore/magick-config.h index 6fe106710..4f420e393 100644 --- a/MagickCore/magick-config.h +++ b/MagickCore/magick-config.h @@ -1528,7 +1528,6 @@ /* Define this for the OpenCL Accelerator */ #ifndef MAGICKCORE__OPENCL -#define MAGICKCORE__OPENCL 1 #endif /* Define to 2 if the system does not provide POSIX.1 features except with diff --git a/MagickCore/version.h b/MagickCore/version.h index 652af7a80..d5dc7ed7d 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -27,14 +27,14 @@ extern "C" { */ #define MagickPackageName "ImageMagick" #define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC" -#define MagickSVNRevision "exported" +#define MagickSVNRevision "5364" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 7,0,0 #define MagickLibAddendum "-0" #define MagickLibInterface 7 #define MagickLibMinInterface 7 -#define MagickReleaseDate "2011-09-24" +#define MagickReleaseDate "2011-09-25" #define MagickChangeDate "20110801" #define MagickAuthoritativeURL "http://www.imagemagick.org" #if defined(MAGICKCORE_OPENMP_SUPPORT) diff --git a/MagickWand/drawing-wand.c b/MagickWand/drawing-wand.c index 26a7ebe95..7233f90ff 100644 --- a/MagickWand/drawing-wand.c +++ b/MagickWand/drawing-wand.c @@ -1947,7 +1947,7 @@ WandExport double *DrawGetStrokeDashArray(const DrawingWand *wand, n=0; p=CurrentContext->dash_pattern; if (p != (const double *) NULL) - while (*p++ != 0.0) + while (fabs(*p++) >= MagickEpsilon) n++; *number_elements=n; dash_array=(double *) NULL; @@ -2551,7 +2551,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand) *dash_pattern; dash_pattern=AcquireString((char *) NULL); - for (i=0; CurrentContext->dash_pattern[i] != 0.0; i++) + for (i=0; fabs(CurrentContext->dash_pattern[i]) >= MagickEpsilon; i++) { if (i != 0) (void) ConcatenateString(&dash_pattern,","); @@ -5439,7 +5439,7 @@ WandExport MagickBooleanType DrawSetStrokeDashArray(DrawingWand *wand, update=MagickFalse; q=CurrentContext->dash_pattern; if (q != (const double *) NULL) - while (*q++ != 0.0) + while (fabs(*q++) < MagickEpsilon) n_old++; if ((n_old == 0) && (n_new == 0)) update=MagickFalse; @@ -5955,7 +5955,7 @@ WandExport void DrawSetTextKerning(DrawingWand *wand,const double kerning) if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if ((wand->filter_off != MagickFalse) && - (CurrentContext->kerning != kerning)) + ((CurrentContext->kerning-kerning) >= MagickEpsilon)) { CurrentContext->kerning=kerning; (void) MvgPrintf(wand,"kerning %lf\n",kerning); @@ -5996,7 +5996,7 @@ WandExport void DrawSetTextInterlineSpacing(DrawingWand *wand, if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if ((wand->filter_off != MagickFalse) && - (CurrentContext->interline_spacing != interline_spacing)) + ((CurrentContext->interline_spacing-interline_spacing) >= MagickEpsilon)) { CurrentContext->interline_spacing=interline_spacing; (void) MvgPrintf(wand,"interline-spacing %lf\n",interline_spacing); @@ -6037,7 +6037,7 @@ WandExport void DrawSetTextInterwordSpacing(DrawingWand *wand, if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if ((wand->filter_off != MagickFalse) && - (CurrentContext->interword_spacing != interword_spacing)) + ((CurrentContext->interword_spacing-interword_spacing) >= MagickEpsilon)) { CurrentContext->interword_spacing=interword_spacing; (void) MvgPrintf(wand,"interword-spacing %lf\n",interword_spacing); diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c index 793b16c12..8cae5c370 100644 --- a/MagickWand/magick-image.c +++ b/MagickWand/magick-image.c @@ -333,7 +333,7 @@ WandExport MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand, % The format of the AdaptiveThresholdImage method is: % % MagickBooleanType MagickAdaptiveThresholdImage(MagickWand *wand, -% const size_t width,const size_t height,const ssize_t offset) +% const size_t width,const size_t height,const double bias) % % A description of each parameter follows: % @@ -343,11 +343,11 @@ WandExport MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand, % % o height: the height of the local neighborhood. % -% o offset: the mean offset. +% o offset: the mean bias. % */ WandExport MagickBooleanType MagickAdaptiveThresholdImage(MagickWand *wand, - const size_t width,const size_t height,const ssize_t offset) + const size_t width,const size_t height,const double bias) { Image *threshold_image; @@ -358,7 +358,7 @@ WandExport MagickBooleanType MagickAdaptiveThresholdImage(MagickWand *wand, (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if (wand->images == (Image *) NULL) ThrowWandException(WandError,"ContainsNoImages",wand->name); - threshold_image=AdaptiveThresholdImage(wand->images,width,height,offset, + threshold_image=AdaptiveThresholdImage(wand->images,width,height,bias, wand->exception); if (threshold_image == (Image *) NULL) return(MagickFalse); @@ -607,10 +607,10 @@ WandExport MagickBooleanType MagickAnnotateImage(MagickWand *wand, return(MagickFalse); (void) CloneString(&draw_info->text,text); (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g",x,y); - draw_info->affine.sx=cos(DegreesToRadians(fmod(angle,360.0))); - draw_info->affine.rx=sin(DegreesToRadians(fmod(angle,360.0))); - draw_info->affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0)))); - draw_info->affine.sy=cos(DegreesToRadians(fmod(angle,360.0))); + draw_info->affine.sx=cos((double) DegreesToRadians(fmod(angle,360.0))); + draw_info->affine.rx=sin((double) DegreesToRadians(fmod(angle,360.0))); + draw_info->affine.ry=(-sin((double) DegreesToRadians(fmod(angle,360.0)))); + draw_info->affine.sy=cos((double) DegreesToRadians(fmod(angle,360.0))); (void) CloneString(&draw_info->geometry,geometry); status=AnnotateImage(wand->images,draw_info,&wand->images->exception); draw_info=DestroyDrawInfo(draw_info); diff --git a/MagickWand/magick-image.h b/MagickWand/magick-image.h index 0fec2635a..0474d2400 100644 --- a/MagickWand/magick-image.h +++ b/MagickWand/magick-image.h @@ -77,7 +77,7 @@ extern WandExport MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *,const double,const double, const double), MagickAdaptiveThresholdImage(MagickWand *,const size_t,const size_t, - const ssize_t), + const double), MagickAddImage(MagickWand *,const MagickWand *), MagickAddNoiseImage(MagickWand *,const NoiseType), MagickAffineTransformImage(MagickWand *,const DrawingWand *), diff --git a/MagickWand/pixel-iterator.c b/MagickWand/pixel-iterator.c index 20ce1dbd5..e1883ebb4 100644 --- a/MagickWand/pixel-iterator.c +++ b/MagickWand/pixel-iterator.c @@ -728,15 +728,6 @@ WandExport PixelWand **PixelGetNextIteratorRow(PixelIterator *iterator, % o number_wands: the number of pixel wands. % */ - -WandExport PixelWand **PixelGetPreviousRow(PixelIterator *iterator) -{ - size_t - number_wands; - - return(PixelGetPreviousIteratorRow(iterator,&number_wands)); -} - WandExport PixelWand **PixelGetPreviousIteratorRow(PixelIterator *iterator, size_t *number_wands) { diff --git a/coders/png.c b/coders/png.c index 883f70d12..9d1ce78e9 100644 --- a/coders/png.c +++ b/coders/png.c @@ -12846,9 +12846,12 @@ static MagickBooleanType WriteMNGImage(const ImageInfo *image_info,Image *image, for (i=0; i < (ssize_t) image->colors; i++) { - chunk[4+i*3]=ScaleQuantumToChar(image->colormap[i].red) & 0xff; - chunk[5+i*3]=ScaleQuantumToChar(image->colormap[i].green) & 0xff; - chunk[6+i*3]=ScaleQuantumToChar(image->colormap[i].blue) & 0xff; + chunk[4+i*3]=(unsigned char) (ScaleQuantumToChar( + image->colormap[i].red) & 0xff); + chunk[5+i*3]=(unsigned char) (ScaleQuantumToChar( + image->colormap[i].green) & 0xff); + chunk[6+i*3]=(unsigned char) (ScaleQuantumToChar( + image->colormap[i].blue) & 0xff); } (void) WriteBlob(image,data_length+4,chunk); diff --git a/filters/analyze.c b/filters/analyze.c index 4cb46a374..4d73c4cb0 100644 --- a/filters/analyze.c +++ b/filters/analyze.c @@ -192,7 +192,7 @@ ModuleExport size_t analyzeImage(Image **images,const int argc, (void) FormatLocaleString(text,MaxTextExtent,"%g", brightness_standard_deviation); (void) SetImageProperty(image,"filter:brightness:standard-deviation",text); - if (brightness_standard_deviation != 0) + if (fabs(brightness_standard_deviation) >= MagickEpsilon) brightness_kurtosis=(brightness_sum_x4/area-4.0*brightness_mean* brightness_sum_x3/area+6.0*brightness_mean*brightness_mean* brightness_sum_x2/area-3.0*brightness_mean*brightness_mean* @@ -216,7 +216,7 @@ ModuleExport size_t analyzeImage(Image **images,const int argc, (void) FormatLocaleString(text,MaxTextExtent,"%g", saturation_standard_deviation); (void) SetImageProperty(image,"filter:saturation:standard-deviation",text); - if (saturation_standard_deviation != 0) + if (fabs(saturation_standard_deviation) >= MagickEpsilon) saturation_kurtosis=(saturation_sum_x4/area-4.0*saturation_mean* saturation_sum_x3/area+6.0*saturation_mean*saturation_mean* saturation_sum_x2/area-3.0*saturation_mean*saturation_mean* @@ -225,7 +225,7 @@ ModuleExport size_t analyzeImage(Image **images,const int argc, saturation_standard_deviation)-3.0; (void) FormatLocaleString(text,MaxTextExtent,"%g",saturation_kurtosis); (void) SetImageProperty(image,"filter:saturation:kurtosis",text); - if (saturation_standard_deviation != 0) + if (fabs(saturation_standard_deviation) >= MagickEpsilon) saturation_skewness=(saturation_sum_x3/area-3.0*saturation_mean* saturation_sum_x2/area+2.0*saturation_mean*saturation_mean* saturation_mean)/(saturation_standard_deviation*