]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 26 Sep 2011 17:29:10 +0000 (17:29 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 26 Sep 2011 17:29:10 +0000 (17:29 +0000)
MagickCore/magick-config.h
MagickCore/version.h
MagickWand/drawing-wand.c
MagickWand/magick-image.c
MagickWand/magick-image.h
MagickWand/pixel-iterator.c
coders/png.c
filters/analyze.c

index 6fe106710b0f3257f6aacd5f2b5b6a89056ac642..4f420e39334e74dce8059c75061798a088fcee92 100644 (file)
 
 /* 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
index 652af7a80b276948563f0a57740e2eb1f0ba4cc2..d5dc7ed7df9e328a2dfad1c64145f8e08b3dea1b 100644 (file)
@@ -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)
index 26a7ebe95553bd5e0690bc84b0602736ea6eed3e..7233f90ffa600cd1d037590acb110c4596ad6ed0 100644 (file)
@@ -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);
index 793b16c12494b29e38ecdf4132b0391642bd49b4..8cae5c3708326bbeb20350099c5af9b0b3bb6569 100644 (file)
@@ -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);
index 0fec2635ab6935e26445f7b898271b2f453b3ac4..0474d2400a26af6db0c24301e7ddc8fb26e44604 100644 (file)
@@ -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 *),
index 20ce1dbd51e32ab14100d614f815aac1d3b6981e..e1883ebb41f9754ef21d7ce6ec03caa5f9c6e8f0 100644 (file)
@@ -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)
 {
index 883f70d120a4ef066bbfb4f9a7494bac9be4f764..9d1ce78e91161c874908fd8b832f1c942c4373c7 100644 (file)
@@ -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);
index 4cb46a374565a32a192ad829854e3881ccc56fff..4d73c4cb006b646c6d6e92235465ce689e8fe2ab 100644 (file)
@@ -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*