]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 3 Jun 2012 15:01:15 +0000 (15:01 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 3 Jun 2012 15:01:15 +0000 (15:01 +0000)
26 files changed:
MagickCore/accelerate.c
MagickCore/colorspace.c
MagickCore/compare.c
MagickCore/composite-private.h
MagickCore/composite.c
MagickCore/distort.c
MagickCore/draw.c
MagickCore/effect.c
MagickCore/feature.c
MagickCore/image.c
MagickCore/magick-type.h
MagickCore/morphology.c
MagickCore/pixel-private.h
MagickCore/pixel.c
MagickCore/profile.c
MagickCore/property.c
MagickCore/quantize.c
MagickCore/quantum-import.c
MagickCore/resize.c
MagickCore/version.h
NOTICE
PerlMagick/Makefile.PL
coders/pango.c
coders/svg.c
config/ImageMagick.rdf
config/configure.xml

index 93f718d89a2026ca889039a623d74df36ba171e3..eab0b31cb7cf71c0f7771c184ddaa6f38342fac9 100644 (file)
@@ -295,7 +295,7 @@ static const char
     "      break;\n"
     "    }\n"
     "  }\n"
-    "  gamma=ClampReciprocal(gamma);\n"
+    "  gamma=MagickReciprocal(gamma);\n"
     "  const unsigned long index = y*columns+x;\n"
     "  output[index].x=ClampToQuantum(gamma*sum.x);\n"
     "  output[index].y=ClampToQuantum(gamma*sum.y);\n"
index 36a87793693c4d18ab0a3aa69f00e678ededcdc8..c558a82c6086e8020e2a5a65e410ab75e1708aa9 100644 (file)
@@ -642,7 +642,7 @@ static MagickBooleanType sRGBTransformImage(Image *image,
       gamma=DisplayGamma;
       value=GetImageProperty(image,"gamma",exception);
       if (value != (const char *) NULL)
-        gamma=ClampReciprocal(StringToDouble(value,(char **) NULL));
+        gamma=MagickReciprocal(StringToDouble(value,(char **) NULL));
       film_gamma=FilmGamma;
       value=GetImageProperty(image,"film-gamma",exception);
       if (value != (const char *) NULL)
@@ -2150,7 +2150,7 @@ static MagickBooleanType TransformsRGBImage(Image *image,
       gamma=DisplayGamma;
       value=GetImageProperty(image,"gamma",exception);
       if (value != (const char *) NULL)
-        gamma=ClampReciprocal(StringToDouble(value,(char **) NULL));
+        gamma=MagickReciprocal(StringToDouble(value,(char **) NULL));
       film_gamma=FilmGamma;
       value=GetImageProperty(image,"film-gamma",exception);
       if (value != (const char *) NULL)
index d57c1386013dda16a6cb95f48e5afea75e767955..d9060807503364494f2df19343ba865f25f8e916 100644 (file)
@@ -950,7 +950,7 @@ static MagickBooleanType GetNormalizedCrossCorrelationDistortion(
     channel=GetPixelChannelMapChannel(image,i);
     gamma=image_statistics[i].standard_deviation*
       reconstruct_statistics[channel].standard_deviation;
-    gamma=ClampReciprocal(gamma);
+    gamma=MagickReciprocal(gamma);
     distortion[i]=QuantumRange*gamma*distortion[i];
     distortion[CompositePixelChannel]+=distortion[i]*distortion[i];
   }
index 5d2f16dde0fde575735837d8cc48ade232236765..c0c9a7d30e7b5f1008a9058323dbc0f7f04acd16 100644 (file)
@@ -62,7 +62,7 @@ static inline void CompositePixelOver(const Image *image,const PixelInfo *p,
   Sa=QuantumScale*alpha;
   Da=QuantumScale*beta,
   gamma=Sa*(-Da)+Sa+Da;
-  gamma=ClampReciprocal(gamma);
+  gamma=MagickReciprocal(gamma);
   for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
   {
     PixelChannel
@@ -133,7 +133,7 @@ static inline void CompositePixelInfoOver(const PixelInfo *p,
   Da=QuantumScale*beta,
   gamma=Sa*(-Da)+Sa+Da;
   composite->alpha=(MagickRealType) QuantumRange*gamma;
-  gamma=ClampReciprocal(gamma);
+  gamma=MagickReciprocal(gamma);
   composite->red=gamma*MagickOver_(p->red,alpha,q->red,beta);
   composite->green=gamma*MagickOver_(p->green,alpha,q->green,beta);
   composite->blue=gamma*MagickOver_(p->blue,alpha,q->blue,beta);
@@ -162,7 +162,7 @@ static inline void CompositePixelInfoPlus(const PixelInfo *p,
   Da=QuantumScale*beta;
   gamma=RoundToUnity(Sa+Da);  /* 'Plus' blending -- not 'Over' blending */
   composite->alpha=(MagickRealType) QuantumRange*gamma;
-  gamma=ClampReciprocal(gamma);
+  gamma=MagickReciprocal(gamma);
   composite->red=gamma*(Sa*p->red+Da*q->red);
   composite->green=gamma*(Sa*p->green+Da*q->green);
   composite->blue=gamma*(Sa*p->blue+Da*q->blue);
index 7bf2f98625292986e3320ee353e2a7a28a0d1e98..8f810a6801ef804a8fa7fc745023b39927fc6d6e 100644 (file)
@@ -502,7 +502,7 @@ static MagickBooleanType CompositeOverImage(Image *image,
         */
         Sc=(MagickRealType) GetPixelChannel(composite_image,channel,p);
         Dc=(MagickRealType) q[i];
-        gamma=ClampReciprocal(alpha);
+        gamma=MagickReciprocal(alpha);
         q[i]=ClampToQuantum(gamma*(Sa*Sc-Sa*Da*Dc+Da*Dc));
       }
       p+=GetPixelChannels(composite_image);
@@ -1649,7 +1649,7 @@ MagickExport MagickBooleanType CompositeImage(Image *image,
           default:
             break;
         }
-        gamma=ClampReciprocal(alpha);
+        gamma=MagickReciprocal(alpha);
         pixel=Dc;
         switch (compose)
         {
index 38aba06d2bd846afd3831531f7d547d4b6dbe09a..96dc6829edba4cf3db45466dda43368ade09d678 100644 (file)
@@ -1798,28 +1798,28 @@ MagickExport Image *DistortImage(const Image *image,DistortImageMethod method,
         s.x = (double) image->page.x;
         s.y = (double) image->page.y;
         scale=inverse[6]*s.x+inverse[7]*s.y+1.0;
-        scale=ClampReciprocal(scale);
+        scale=MagickReciprocal(scale);
         d.x = scale*(inverse[0]*s.x+inverse[1]*s.y+inverse[2]);
         d.y = scale*(inverse[3]*s.x+inverse[4]*s.y+inverse[5]);
         InitalBounds(d);
         s.x = (double) image->page.x+image->columns;
         s.y = (double) image->page.y;
         scale=inverse[6]*s.x+inverse[7]*s.y+1.0;
-        scale=ClampReciprocal(scale);
+        scale=MagickReciprocal(scale);
         d.x = scale*(inverse[0]*s.x+inverse[1]*s.y+inverse[2]);
         d.y = scale*(inverse[3]*s.x+inverse[4]*s.y+inverse[5]);
         ExpandBounds(d);
         s.x = (double) image->page.x;
         s.y = (double) image->page.y+image->rows;
         scale=inverse[6]*s.x+inverse[7]*s.y+1.0;
-        scale=ClampReciprocal(scale);
+        scale=MagickReciprocal(scale);
         d.x = scale*(inverse[0]*s.x+inverse[1]*s.y+inverse[2]);
         d.y = scale*(inverse[3]*s.x+inverse[4]*s.y+inverse[5]);
         ExpandBounds(d);
         s.x = (double) image->page.x+image->columns;
         s.y = (double) image->page.y+image->rows;
         scale=inverse[6]*s.x+inverse[7]*s.y+1.0;
-        scale=ClampReciprocal(scale);
+        scale=MagickReciprocal(scale);
         d.x = scale*(inverse[0]*s.x+inverse[1]*s.y+inverse[2]);
         d.y = scale*(inverse[3]*s.x+inverse[4]*s.y+inverse[5]);
         ExpandBounds(d);
index 9658e8542f78e6026dbce0e631b5a4755c3f9887..4b2b82b0657cc7f62d96486e18dddc00396de6cc 100644 (file)
@@ -3180,7 +3180,7 @@ static inline MagickRealType GetStopColorOffset(const GradientInfo *gradient,
       q.y=(double) y-gradient_vector->y1;
       length=sqrt(q.x*q.x+q.y*q.y);
       gamma=sqrt(p.x*p.x+p.y*p.y)*length;
-      gamma=ClampReciprocal(gamma);
+      gamma=MagickReciprocal(gamma);
       scale=p.x*q.x+p.y*q.y;
       offset=gamma*scale*length;
       return(offset);
index 623c38ed63c83249ec6dfe1edc8992ffc2dc04db..9b74f329dee843252b07a42a0ef901d338edfe2b 100644 (file)
@@ -408,7 +408,7 @@ MagickExport Image *AdaptiveBlurImage(const Image *image,const double radius,
                 pixels+=GetPixelChannels(image);
               }
             }
-            gamma=ClampReciprocal(gamma);
+            gamma=MagickReciprocal(gamma);
             SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
             continue;
           }
@@ -426,7 +426,7 @@ MagickExport Image *AdaptiveBlurImage(const Image *image,const double radius,
             pixels+=GetPixelChannels(image);
           }
         }
-        gamma=ClampReciprocal(gamma);
+        gamma=MagickReciprocal(gamma);
         SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
       }
       q+=GetPixelChannels(blur_image);
@@ -735,7 +735,7 @@ MagickExport Image *AdaptiveSharpenImage(const Image *image,const double radius,
                 pixels+=GetPixelChannels(image);
               }
             }
-            gamma=ClampReciprocal(gamma);
+            gamma=MagickReciprocal(gamma);
             SetPixelChannel(sharp_image,channel,ClampToQuantum(gamma*pixel),q);
             continue;
           }
@@ -753,7 +753,7 @@ MagickExport Image *AdaptiveSharpenImage(const Image *image,const double radius,
             pixels+=GetPixelChannels(image);
           }
         }
-        gamma=ClampReciprocal(gamma);
+        gamma=MagickReciprocal(gamma);
         SetPixelChannel(sharp_image,channel,ClampToQuantum(gamma*pixel),q);
       }
       q+=GetPixelChannels(sharp_image);
@@ -1051,7 +1051,7 @@ MagickExport Image *BlurImage(const Image *image,const double radius,
           k++;
           pixels+=GetPixelChannels(image);
         }
-        gamma=ClampReciprocal(gamma);
+        gamma=MagickReciprocal(gamma);
         SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
       }
       p+=GetPixelChannels(image);
@@ -1181,7 +1181,7 @@ MagickExport Image *BlurImage(const Image *image,const double radius,
           k++;
           pixels+=GetPixelChannels(blur_image);
         }
-        gamma=ClampReciprocal(gamma);
+        gamma=MagickReciprocal(gamma);
         SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
       }
       p+=GetPixelChannels(blur_image);
@@ -2060,7 +2060,7 @@ MagickExport Image *MotionBlurImage(const Image *image,const double radius,
           gamma+=(*k)*alpha;
           k++;
         }
-        gamma=ClampReciprocal(gamma);
+        gamma=MagickReciprocal(gamma);
         SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
       }
       p+=GetPixelChannels(image);
@@ -2843,7 +2843,7 @@ MagickExport Image *RadialBlurImage(const Image *image,const double angle,
               pixel+=r[i];
               gamma++;
             }
-            gamma=ClampReciprocal(gamma);
+            gamma=MagickReciprocal(gamma);
             SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
             continue;
           }
@@ -2861,7 +2861,7 @@ MagickExport Image *RadialBlurImage(const Image *image,const double angle,
           pixel+=GetPixelAlpha(image,r)*r[i];
           gamma+=GetPixelAlpha(image,r);
         }
-        gamma=ClampReciprocal(gamma);
+        gamma=MagickReciprocal(gamma);
         SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
       }
       p+=GetPixelChannels(image);
@@ -3139,7 +3139,7 @@ MagickExport Image *SelectiveBlurImage(const Image *image,const double radius,
                 SetPixelChannel(blur_image,channel,p[center+i],q);
                 continue;
               }
-            gamma=ClampReciprocal(gamma);
+            gamma=MagickReciprocal(gamma);
             SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
             continue;
           }
@@ -3165,7 +3165,7 @@ MagickExport Image *SelectiveBlurImage(const Image *image,const double radius,
             SetPixelChannel(blur_image,channel,p[center+i],q);
             continue;
           }
-        gamma=ClampReciprocal(gamma);
+        gamma=MagickReciprocal(gamma);
         SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
       }
       p+=GetPixelChannels(image);
index f814b80bf4854d3d43c6b8a1edc49cd96cb21a7d..863be65bed8e8ed076aecb1bcf75e6c6d44fe49f 100644 (file)
@@ -572,7 +572,7 @@ MagickExport ChannelFeatures *GetImageFeatures(const Image *image,
         break;
       }
     }
-    normalize=ClampReciprocal(normalize);
+    normalize=MagickReciprocal(normalize);
     for (y=0; y < (ssize_t) number_grays; y++)
     {
       register ssize_t
index 0f88576d50e8adadb1ee002afbf917a54065e698..c0aea2c983fb3e296e0a921d03476c6c2f14f1ac 100644 (file)
@@ -2087,7 +2087,7 @@ static inline void FlattenPixelInfo(const Image *image,const PixelInfo *p,
   Sa=QuantumScale*alpha;
   Da=QuantumScale*beta,
   gamma=Sa*(-Da)+Sa+Da;
-  gamma=ClampReciprocal(gamma);
+  gamma=MagickReciprocal(gamma);
   for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
   {
     PixelChannel
index 1459685bf2183452c1ed16bb3a24dd8dbc38adf9..70614d9a734496b1408b9853feb4b04d924fe863 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
 #endif
 
 #if (MAGICKCORE_QUANTUM_DEPTH == 8)
-#define MagickEpsilon  ((MagickRealType) 1.0e-6)
+#define MagickEpsilon  ((MagickRealType) 1.0e-7)
 #define MaxColormapSize  256UL
 #define MaxMap  255UL
 
@@ -56,7 +56,7 @@ typedef unsigned char Quantum;
 #define QuantumFormat  "%u"
 #endif
 #elif (MAGICKCORE_QUANTUM_DEPTH == 16)
-#define MagickEpsilon  ((MagickRealType) 1.0e-10)
+#define MagickEpsilon  ((MagickRealType) 1.0e-16)
 #define MaxColormapSize  65536UL
 #define MaxMap  65535UL
 
@@ -75,7 +75,7 @@ typedef unsigned short Quantum;
 #define QuantumFormat  "%u"
 #endif
 #elif (MAGICKCORE_QUANTUM_DEPTH == 32)
-#define MagickEpsilon  ((MagickRealType) 1.0e-10)
+#define MagickEpsilon  ((MagickRealType) 1.0e-16)
 #define MaxColormapSize  65536UL
 #define MaxMap  65535UL
 
@@ -90,7 +90,7 @@ typedef unsigned int Quantum;
 #define QuantumFormat  "%u"
 #endif
 #elif (MAGICKCORE_QUANTUM_DEPTH == 64) && defined(MAGICKCORE_HAVE_LONG_DOUBLE_WIDER)
-#define MagickEpsilon  ((MagickRealType) 1.0e-10)
+#define MagickEpsilon  ((MagickRealType) 1.0e-16)
 #define MaxColormapSize  65536UL
 #define MaxMap  65535UL
 
index 61b3cd9ad07ee2419eb332e3073509e221079564..ff1ef03eb343f10406bd4fdc204cf050037d0e4d 100644 (file)
@@ -4270,7 +4270,7 @@ MagickExport Image *MorphologyImage(const Image *image,
 
   curr_kernel = (KernelInfo *) kernel;
   bias=0.0;
-  compose = (ssize_t)UndefinedCompositeOp;  /* use default for method */
+  compose = UndefinedCompositeOp;  /* use default for method */
 
   /* Apply Convolve/Correlate Normalization and Scaling Factors.
    * This is done BEFORE the ShowKernelInfo() function is called so that
@@ -4610,7 +4610,7 @@ MagickExport void ScaleGeometryKernelInfo (KernelInfo *kernel,
     args.sigma = 0.0;
 
   /* Scale/Normalize the input kernel */
-  ScaleKernelInfo(kernel, args.rho, flags);
+  ScaleKernelInfo(kernel, args.rho, (GeometryFlags) flags);
 
   /* Add Unity Kernel, for blending with original */
   if ( (flags & SigmaValue) != 0 )
index 303da7a29e30427ef6cb26a7644ec88e66cfea96..f7d3e46f7b37433901b811a5c47f3d743c9e2857 100644 (file)
 extern "C" {
 #endif
 
-static inline MagickRealType ClampReciprocal(const MagickRealType alpha)
+static inline MagickRealType MagickReciprocal(const MagickRealType x)
 {
-  MagickRealType
-    beta;
-
-  /*
-    Reciprocal alpha: clamp to [MagickEpsilon,1], return reciprocal.
-  beta=(alpha > (MagickRealType) 1.0 ? (MagickRealType) 1.0 : alpha);
-  beta=(beta < MagickEpsilon ? MagickEpsilon : beta);
-  */
-beta=(fabs((double) alpha) < MagickEpsilon ? MagickEpsilon : alpha);
-  return((MagickRealType) 1.0/beta);
+  return((MagickRealType) 1.0/(((x) > (MagickRealType) 0.0 ? (x) : -(x)) <
+    MagickEpsilon ? MagickEpsilon : x));
 }
 
 #if defined(__cplusplus) || defined(c_plusplus)
index e4935bc98e1c5ad6ce9f6fbbaf04546707074f84..2eab8648ed588932a67a18cfe43a8a2e2711a3e9 100644 (file)
@@ -4136,7 +4136,7 @@ MagickExport MagickBooleanType InterpolatePixelChannel(const Image *image,
         }
       for (i=0; i < 16; i++)
       {
-        gamma=ClampReciprocal(alpha[i]);
+        gamma=MagickReciprocal(alpha[i]);
         *pixel+=gamma*0.0625*pixels[i];
       }
       break;
@@ -4199,7 +4199,7 @@ MagickExport MagickBooleanType InterpolatePixelChannel(const Image *image,
       */
       gamma=1.0;
       if (channel != AlphaPixelChannel)
-        gamma=ClampReciprocal(cy[0]*(cx[0]*alpha[0]+cx[1]*alpha[1]+cx[2]*
+        gamma=MagickReciprocal(cy[0]*(cx[0]*alpha[0]+cx[1]*alpha[1]+cx[2]*
           alpha[2]+cx[3]*alpha[3])+cy[1]*(cx[0]*alpha[4]+cx[1]*alpha[5]+
           cx[2]*alpha[6]+cx[3]*alpha[7])+cy[2]*(cx[0]*alpha[8]+
           cx[1]*alpha[9]+cx[2]*alpha[10]+cx[3]*alpha[11])+cy[3]*(
@@ -4243,7 +4243,7 @@ MagickExport MagickBooleanType InterpolatePixelChannel(const Image *image,
       epsilon.y=1.0-delta.y;
       gamma=((epsilon.y*(epsilon.x*alpha[0]+delta.x*alpha[1])+delta.y*
         (epsilon.x*alpha[2]+delta.x*alpha[3])));
-      gamma=ClampReciprocal(gamma);
+      gamma=MagickReciprocal(gamma);
       *pixel=gamma*(epsilon.y*(epsilon.x*pixels[0]+delta.x*pixels[1])+delta.y*
         (epsilon.x*pixels[2]+delta.x*pixels[3]));
       break;
@@ -4350,7 +4350,7 @@ MagickExport MagickBooleanType InterpolatePixelChannel(const Image *image,
               */
               delta.y=1.0-delta.y;
               gamma=MeshInterpolate(&delta,alpha[2],alpha[3],alpha[0]);
-              gamma=ClampReciprocal(gamma);
+              gamma=MagickReciprocal(gamma);
               *pixel=gamma*MeshInterpolate(&delta,pixels[2],pixels[3],
                 pixels[0]);
             }
@@ -4361,7 +4361,7 @@ MagickExport MagickBooleanType InterpolatePixelChannel(const Image *image,
               */
               delta.x=1.0-delta.x;
               gamma=MeshInterpolate(&delta,alpha[1],alpha[0],alpha[3]);
-              gamma=ClampReciprocal(gamma);
+              gamma=MagickReciprocal(gamma);
               *pixel=gamma*MeshInterpolate(&delta,pixels[1],pixels[0],
                 pixels[3]);
             }
@@ -4377,7 +4377,7 @@ MagickExport MagickBooleanType InterpolatePixelChannel(const Image *image,
                 Top-left triangle (pixel: 0, diagonal: 1-2).
               */
               gamma=MeshInterpolate(&delta,alpha[0],alpha[1],alpha[2]);
-              gamma=ClampReciprocal(gamma);
+              gamma=MagickReciprocal(gamma);
               *pixel=gamma*MeshInterpolate(&delta,pixels[0],pixels[1],
                 pixels[2]);
             }
@@ -4389,7 +4389,7 @@ MagickExport MagickBooleanType InterpolatePixelChannel(const Image *image,
               delta.x=1.0-delta.x;
               delta.y=1.0-delta.y;
               gamma=MeshInterpolate(&delta,alpha[3],alpha[2],alpha[1]);
-              gamma=ClampReciprocal(gamma);
+              gamma=MagickReciprocal(gamma);
               *pixel=gamma*MeshInterpolate(&delta,pixels[3],pixels[2],
                 pixels[1]);
             }
@@ -4438,7 +4438,7 @@ MagickExport MagickBooleanType InterpolatePixelChannel(const Image *image,
         for (j=(-1); j < 3L; j++)
         {
           dx=CubicWeightingFunction(delta.x-(MagickRealType) j);
-          gamma=ClampReciprocal(alpha[n]);
+          gamma=MagickReciprocal(alpha[n]);
           *pixel+=gamma*dx*dy*pixels[n];
           n++;
         }
@@ -4565,7 +4565,7 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
           alpha[j]=QuantumScale*GetPixelAlpha(source,p+j*
             GetPixelChannels(source));
           pixels[j]*=alpha[j];
-          gamma=ClampReciprocal(alpha[j]);
+          gamma=MagickReciprocal(alpha[j]);
           sum+=gamma*0.0625*pixels[j];
         }
         SetPixelChannel(destination,channel,ClampToQuantum(sum),pixel);
@@ -4641,7 +4641,7 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
         */
         gamma=1.0;
         if ((traits & BlendPixelTrait) == 0)
-          gamma=ClampReciprocal(cy[0]*(cx[0]*alpha[0]+cx[1]*alpha[1]+cx[2]*
+          gamma=MagickReciprocal(cy[0]*(cx[0]*alpha[0]+cx[1]*alpha[1]+cx[2]*
             alpha[2]+cx[3]*alpha[3])+cy[1]*(cx[0]*alpha[4]+cx[1]*alpha[5]+
             cx[2]*alpha[6]+cx[3]*alpha[7])+cy[2]*(cx[0]*alpha[8]+
             cx[1]*alpha[9]+cx[2]*alpha[10]+cx[3]*alpha[11])+cy[3]*(
@@ -4687,7 +4687,7 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
         if ((traits & BlendPixelTrait) == 0)
           {
             gamma=((epsilon.y*(epsilon.x+delta.x)+delta.y*(epsilon.x+delta.x)));
-            gamma=ClampReciprocal(gamma);
+            gamma=MagickReciprocal(gamma);
             SetPixelChannel(destination,channel,ClampToQuantum(gamma*(epsilon.y*
               (epsilon.x*pixels[0]+delta.x*pixels[1])+delta.y*(epsilon.x*
               pixels[2]+delta.x*pixels[3]))),pixel);
@@ -4705,7 +4705,7 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
         pixels[3]*=alpha[3];
         gamma=((epsilon.y*(epsilon.x*alpha[0]+delta.x*alpha[1])+delta.y*
           (epsilon.x*alpha[2]+delta.x*alpha[3])));
-        gamma=ClampReciprocal(gamma);
+        gamma=MagickReciprocal(gamma);
         SetPixelChannel(destination,channel,ClampToQuantum(gamma*(epsilon.y*
           (epsilon.x*pixels[0]+delta.x*pixels[1])+delta.y*(epsilon.x*pixels[2]+
           delta.x*pixels[3]))),pixel);
@@ -4859,7 +4859,7 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
                 */
                 delta.y=1.0-delta.y;
                 gamma=MeshInterpolate(&delta,alpha[2],alpha[3],alpha[0]);
-                gamma=ClampReciprocal(gamma);
+                gamma=MagickReciprocal(gamma);
                 SetPixelChannel(destination,channel,ClampToQuantum(gamma*
                   MeshInterpolate(&delta,pixels[2],pixels[3],pixels[0])),pixel);
               }
@@ -4870,7 +4870,7 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
                 */
                 delta.x=1.0-delta.x;
                 gamma=MeshInterpolate(&delta,alpha[1],alpha[0],alpha[3]);
-                gamma=ClampReciprocal(gamma);
+                gamma=MagickReciprocal(gamma);
                 SetPixelChannel(destination,channel,ClampToQuantum(gamma*
                   MeshInterpolate(&delta,pixels[1],pixels[0],pixels[3])),pixel);
               }
@@ -4886,7 +4886,7 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
                   Top-left triangle (pixel: 0, diagonal: 1-2).
                 */
                 gamma=MeshInterpolate(&delta,alpha[0],alpha[1],alpha[2]);
-                gamma=ClampReciprocal(gamma);
+                gamma=MagickReciprocal(gamma);
                 SetPixelChannel(destination,channel,ClampToQuantum(gamma*
                   MeshInterpolate(&delta,pixels[0],pixels[1],pixels[2])),pixel);
               }
@@ -4898,7 +4898,7 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
                 delta.x=1.0-delta.x;
                 delta.y=1.0-delta.y;
                 gamma=MeshInterpolate(&delta,alpha[3],alpha[2],alpha[1]);
-                gamma=ClampReciprocal(gamma);
+                gamma=MagickReciprocal(gamma);
                 SetPixelChannel(destination,channel,ClampToQuantum(gamma*
                   MeshInterpolate(&delta,pixels[3],pixels[2],pixels[1])),pixel);
               }
@@ -4963,7 +4963,7 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
           for (k=(-1); k < 3L; k++)
           {
             dx=CubicWeightingFunction(delta.x-(MagickRealType) k);
-            gamma=ClampReciprocal(alpha[n]);
+            gamma=MagickReciprocal(alpha[n]);
             sum+=gamma*dx*dy*pixels[n];
             n++;
           }
@@ -5109,7 +5109,7 @@ MagickExport MagickBooleanType InterpolatePixelInfo(const Image *image,
       pixel->alpha=0.0;
       for (i=0; i < 16L; i++)
       {
-        gamma=ClampReciprocal(alpha[i]);
+        gamma=MagickReciprocal(alpha[i]);
         pixel->red+=gamma*0.0625*pixels[i].red;
         pixel->green+=gamma*0.0625*pixels[i].green;
         pixel->blue+=gamma*0.0625*pixels[i].blue;
@@ -5251,7 +5251,7 @@ MagickExport MagickBooleanType InterpolatePixelInfo(const Image *image,
       epsilon.y=1.0-delta.y;
       gamma=((epsilon.y*(epsilon.x*alpha[0]+delta.x*alpha[1])+delta.y*
         (epsilon.x*alpha[2]+delta.x*alpha[3])));
-      gamma=ClampReciprocal(gamma);
+      gamma=MagickReciprocal(gamma);
       pixel->red=gamma*(epsilon.y*(epsilon.x*pixels[0].red+delta.x*
         pixels[1].red)+delta.y*(epsilon.x*pixels[2].red+delta.x*pixels[3].red));
       pixel->green=gamma*(epsilon.y*(epsilon.x*pixels[0].green+delta.x*
@@ -5265,7 +5265,7 @@ MagickExport MagickBooleanType InterpolatePixelInfo(const Image *image,
           pixels[1].black)+delta.y*(epsilon.x*pixels[2].black+delta.x*
           pixels[3].black));
       gamma=((epsilon.y*(epsilon.x+delta.x)+delta.y*(epsilon.x+delta.x)));
-      gamma=ClampReciprocal(gamma);
+      gamma=MagickReciprocal(gamma);
       pixel->alpha=(epsilon.y*(epsilon.x*pixels[0].alpha+delta.x*
         pixels[1].alpha)+delta.y*(epsilon.x*pixels[2].alpha+delta.x*
         pixels[3].alpha));
@@ -5350,7 +5350,7 @@ MagickExport MagickBooleanType InterpolatePixelInfo(const Image *image,
               */
               delta.y=1.0-delta.y;
               gamma=MeshInterpolate(&delta,alpha[2],alpha[3],alpha[0]);
-              gamma=ClampReciprocal(gamma);
+              gamma=MagickReciprocal(gamma);
               pixel->red=gamma*MeshInterpolate(&delta,pixels[2].red,
                 pixels[3].red,pixels[0].red);
               pixel->green=gamma*MeshInterpolate(&delta,pixels[2].green,
@@ -5371,7 +5371,7 @@ MagickExport MagickBooleanType InterpolatePixelInfo(const Image *image,
               */
               delta.x=1.0-delta.x;
               gamma=MeshInterpolate(&delta,alpha[1],alpha[0],alpha[3]);
-              gamma=ClampReciprocal(gamma);
+              gamma=MagickReciprocal(gamma);
               pixel->red=gamma*MeshInterpolate(&delta,pixels[1].red,
                 pixels[0].red,pixels[3].red);
               pixel->green=gamma*MeshInterpolate(&delta,pixels[1].green,
@@ -5397,7 +5397,7 @@ MagickExport MagickBooleanType InterpolatePixelInfo(const Image *image,
                 Top-left triangle (pixel: 0, diagonal: 1-2).
               */
               gamma=MeshInterpolate(&delta,alpha[0],alpha[1],alpha[2]);
-              gamma=ClampReciprocal(gamma);
+              gamma=MagickReciprocal(gamma);
               pixel->red=gamma*MeshInterpolate(&delta,pixels[0].red,
                 pixels[1].red,pixels[2].red);
               pixel->green=gamma*MeshInterpolate(&delta,pixels[0].green,
@@ -5419,7 +5419,7 @@ MagickExport MagickBooleanType InterpolatePixelInfo(const Image *image,
               delta.x=1.0-delta.x;
               delta.y=1.0-delta.y;
               gamma=MeshInterpolate(&delta,alpha[3],alpha[2],alpha[1]);
-              gamma=ClampReciprocal(gamma);
+              gamma=MagickReciprocal(gamma);
               pixel->red=gamma*MeshInterpolate(&delta,pixels[3].red,
                 pixels[2].red,pixels[1].red);
               pixel->green=gamma*MeshInterpolate(&delta,pixels[3].green,
@@ -5504,7 +5504,7 @@ MagickExport MagickBooleanType InterpolatePixelInfo(const Image *image,
         for (j=(-1); j < 3L; j++)
         {
           dx=CubicWeightingFunction(delta.x-(MagickRealType) j);
-          gamma=ClampReciprocal(alpha[n]);
+          gamma=MagickReciprocal(alpha[n]);
           pixel->red+=gamma*dx*dy*pixels[n].red;
           pixel->green+=gamma*dx*dy*pixels[n].green;
           pixel->blue+=gamma*dx*dy*pixels[n].blue;
index ba2db236cdd8ee68fac86e3d6fe07399bb73fe33..5d21a15396c877da6dafc2358c453754e269672d 100644 (file)
@@ -1874,7 +1874,7 @@ MagickPrivate MagickBooleanType SyncImageProfiles(Image *image)
         break;
       components=(ssize_t) ((int) ReadProfileLong(endian,q+4));
       number_bytes=(size_t) components*format_bytes[format];
-      if (number_bytes < components)
+      if ((ssize_t) number_bytes < components)
         break;  /* prevent overflow */
       if (number_bytes <= 4)
         p=q+8;
index 2d45ea4d15e0fbec73aec30188ee029fbd1b01cd..d0e56cce6f729064849305fee19f3211a627774e 100644 (file)
@@ -45,6 +45,7 @@
 #include "MagickCore/attribute.h"
 #include "MagickCore/cache.h"
 #include "MagickCore/color.h"
+#include "MagickCore/color-private.h"
 #include "MagickCore/compare.h"
 #include "MagickCore/constitute.h"
 #include "MagickCore/draw.h"
@@ -57,7 +58,6 @@
 #include "MagickCore/geometry.h"
 #include "MagickCore/histogram.h"
 #include "MagickCore/image.h"
-#include "MagickCore/image.h"
 #include "MagickCore/layer.h"
 #include "MagickCore/locale-private.h"
 #include "MagickCore/list.h"
@@ -3463,6 +3463,26 @@ MagickExport MagickBooleanType SetImageProperty(Image *image,
           if (colorspace < 0)
             break;
           image->colorspace=(ColorspaceType) colorspace;
+          image->rendering_intent=UndefinedIntent;
+          image->gamma=1.000f;
+          ResetMagickMemory(&image->chromaticity,0,sizeof(image->chromaticity));
+          if (IssRGBColorspace(image->colorspace) != MagickFalse)
+            {
+              image->rendering_intent=PerceptualIntent;
+              image->gamma=1.000f/2.200f;
+              image->chromaticity.red_primary.x=0.6400f;
+              image->chromaticity.red_primary.y=0.3300f;
+              image->chromaticity.red_primary.z=0.0300f;
+              image->chromaticity.green_primary.x=0.3000f;
+              image->chromaticity.green_primary.y=0.6000f;
+              image->chromaticity.green_primary.z=0.1000f;
+              image->chromaticity.blue_primary.x=0.1500f;
+              image->chromaticity.blue_primary.y=0.0600f;
+              image->chromaticity.blue_primary.z=0.7900f;
+              image->chromaticity.white_point.x=0.3127f;
+              image->chromaticity.white_point.y=0.3290f;
+              image->chromaticity.white_point.z=0.3583f;
+            }
           break;
         }
       if (LocaleCompare("compose",property) == 0)
index cfc68767c8a347a7ceda8a6af78f689cb1b28265..f029a65664f9d324e846d8148b077217e60667ea 100644 (file)
@@ -1252,7 +1252,7 @@ static size_t DefineImageColormap(Image *image,CubeInfo *cube_info,
       */
       q=image->colormap+image->colors;
       alpha=(MagickRealType) ((MagickOffsetType) node_info->number_unique);
-      alpha=ClampReciprocal(alpha);
+      alpha=MagickReciprocal(alpha);
       if (cube_info->associate_alpha == MagickFalse)
         {
           q->red=(double) ClampToQuantum((MagickRealType)
@@ -1286,7 +1286,7 @@ static size_t DefineImageColormap(Image *image,CubeInfo *cube_info,
                 gamma;
 
               gamma=(MagickRealType) (QuantumScale*q->alpha);
-              gamma=ClampReciprocal(gamma);
+              gamma=MagickReciprocal(gamma);
               q->red=(double) ClampToQuantum((MagickRealType)
                 (alpha*gamma*QuantumRange*node_info->total_color.red));
               q->green=(double) ClampToQuantum((MagickRealType)
index 628c3bce60d75afd9de8fb1546e2036d9b692759..f9dafd17329c5b6e6d89a58b4cac59d5beac3ad2 100644 (file)
@@ -3610,7 +3610,7 @@ MagickExport size_t ImportQuantumPixels(const Image *image,
             continue;
           }
         Sa=QuantumScale*GetPixelAlpha(image,q);
-        gamma=ClampReciprocal(Sa);
+        gamma=MagickReciprocal(Sa);
         for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
         {
           PixelChannel
index 419d80eaba65dcd9f390fdf70de23eaebf34545c..2501e5a1f140f6b28098440ff6e54f37e90c2217 100644 (file)
@@ -2363,7 +2363,7 @@ static MagickBooleanType HorizontalFilter(const ResizeFilter *resize_filter,
           pixel+=alpha*p[k*GetPixelChannels(image)+i];
           gamma+=alpha;
         }
-        gamma=ClampReciprocal(gamma);
+        gamma=MagickReciprocal(gamma);
         SetPixelChannel(resize_image,channel,ClampToQuantum(gamma*pixel),q);
       }
       q+=GetPixelChannels(resize_image);
@@ -2579,7 +2579,7 @@ static MagickBooleanType VerticalFilter(const ResizeFilter *resize_filter,
           pixel+=alpha*p[k*GetPixelChannels(image)+i];
           gamma+=alpha;
         }
-        gamma=ClampReciprocal(gamma);
+        gamma=MagickReciprocal(gamma);
         SetPixelChannel(resize_image,channel,ClampToQuantum(gamma*pixel),q);
       }
       q+=GetPixelChannels(resize_image);
@@ -3210,7 +3210,7 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns,
               }
             alpha=QuantumScale*scanline[x*GetPixelChannels(image)+
               GetPixelChannelMapChannel(image,AlphaPixelChannel)];
-            gamma=ClampReciprocal(alpha);
+            gamma=MagickReciprocal(alpha);
             SetPixelChannel(scale_image,channel,ClampToQuantum(gamma*scanline[
               x*GetPixelChannels(image)+offset]),q);
           }
@@ -3312,7 +3312,7 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns,
             }
           alpha=QuantumScale*scanline[x*GetPixelChannels(image)+
             GetPixelChannelMapChannel(image,AlphaPixelChannel)];
-          gamma=ClampReciprocal(alpha);
+          gamma=MagickReciprocal(alpha);
           SetPixelChannel(scale_image,channel,ClampToQuantum(gamma*
             scale_scanline[x*MaxPixelChannels+channel]),q);
         }
index 525354a08b8c5f6fae10655268551fe8b391085d..f098af696a0882fabed3dbd7c24b536cc27be9a7 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
 #define MagickLibAddendum  "-0"
 #define MagickLibInterface  7
 #define MagickLibMinInterface  7
-#define MagickReleaseDate  "2012-06-02"
+#define MagickReleaseDate  "2012-06-03"
 #define MagickChangeDate   "20110801"
 #define MagickAuthoritativeURL  "http://www.imagemagick.org"
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
diff --git a/NOTICE b/NOTICE
index aa1c1c27fe90d95d8793895188b85260c3416499..312518cff918dcf78771ec0dddc6b97bc484de1f 100644 (file)
--- a/NOTICE
+++ b/NOTICE
@@ -4,6 +4,20 @@ The sRGB profile is provided "AS IS" WITH NO EXPRESS OR IMPLIED WARRANTY, permis
 
 * * *
 
+ImageMagick was originally developed and distributed by E. I. du Pont de Nemours and Company:
+
+  Copyright 1999 E. I. du Pont de Nemours and Company
+
+  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ("ImageMagick"), to deal in ImageMagick without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of ImageMagick, and to permit persons to whom the ImageMagick is furnished to do so, subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be included in all copies or substantial portions of ImageMagick.
+
+  The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.  In no event shall E. I. du Pont de Nemours and Company be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with ImageMagick or the use or other dealings in ImageMagick.
+
+  Except as contained in this notice, the name of the E. I. du Pont de Nemours and Company shall not be used in advertising or otherwise to promote the sale, use or other dealings in ImageMagick without prior written authorization from the E. I. du Pont de Nemours and Company.  
+
+* * *
+
 This copyright is limited to magick/utility.c/Base64Decode() and Base64Encode(), incorporated from the OpenSSH package:
 
   Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -62,3 +76,14 @@ This copyright is limited to the Magick++ API in the Magick++ folder:
   This copyright notice shall be included in all copies or substantial portions of Magick++. The copyright to Magick++ is retained by its author and shall not be subsumed or replaced by any other copyright.
                                                                             
   The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall Bob Friesenhahn be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with Magick++ or the use or other dealings in Magick++.
+
+* * *
+
+Many of the pattern images in coders/logo.c are derived from XFig, which is distributed under the following license:
+  | FIG : Facility for Interactive Generation of figures
+  | Copyright (c) 1985-1988 by Supoj Sutanthavibul
+  | Parts Copyright (c) 1989-2000 by Brian V. Smith
+  | Parts Copyright (c) 1991 by Paul King
+  Any party obtaining a copy of these files is granted, free of charge, a full and unrestricted irrevocable, world-wide, paid up, royalty-free, nonexclusive right and license to deal in this software and documentation files (the "Software"), including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons who receive copies from any such party to do so, with the only requirement being that this copyright notice remain intact.
index 673e1c2d33ea5f456bee616bdc8f097cd2a3ee78..cc80f416c46e53622c3ccfcd5b322683db7362a6 100644 (file)
@@ -228,9 +228,9 @@ WriteMakefile
    # 'OPTIMIZE'        => '',
 
    # Use same compiler as ImageMagick
-   'PERLMAINCC'        => ' -fopenmp',
+   'PERLMAINCC'        => 'gcc -fopenmp',
    'AR' => 'ar',
-   'LD' => '',
+   'LD' => 'gcc',
 
    # Set Perl installation prefix to ImageMagick installation prefix
 #   'PREFIX'   => '/usr/local',
index 3262b353f843257c72e3153807560ac64d67c84a..c23d19ffde6440cead8d13709b7da47320dfc3f9 100644 (file)
@@ -424,7 +424,7 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
         Disassociate alpha.
       */
       gamma=1.0-QuantumScale*fill_color.alpha;
-      gamma=ClampReciprocal(gamma);
+      gamma=MagickReciprocal(gamma);
       fill_color.blue*=gamma;
       fill_color.green*=gamma;
       fill_color.red*=gamma;
index bafc691f2c5a2d525b77863e6c1942a2c0984940..0c5c96cc68278a4e33b900315f1d9b489685a16a 100644 (file)
@@ -2939,7 +2939,7 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
                   gamma;
     
                 gamma=1.0-QuantumScale*fill_color.alpha;
-                gamma=ClampReciprocal(gamma);
+                gamma=MagickReciprocal(gamma);
                 fill_color.blue*=gamma;
                 fill_color.green*=gamma;
                 fill_color.red*=gamma;
index 1f55ed9acb2378df229c7d69fe29201552877cdb..f0854c68068aa9069f7d669319602f603c40d364 100644 (file)
@@ -5,7 +5,7 @@
     <name>ImageMagick</name>
     <shortdesc xml:lang="en">ImageMagick: convert, edit, and compose images.</shortdesc>
     <homepage rdf:resource="http://www.imagemagick.org/"/>
-    <created>2012-06-02</created>
+    <created>2012-06-03</created>
 
     <description xml:lang="en">
 ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
@@ -57,7 +57,7 @@ Examples of ImageMagick Usage shows how to use ImageMagick from the command-line
     <release>
       <Version>
           <name>stable</name>
-          <created>2012-06-02</created>
+          <created>2012-06-03</created>
           <revision>7.0.0</revision>
           <patch-level>-0</patch-level>
       </Version>
index b080b8f7bea6ec5fd10f07993b17f6252777d5c1..75090d01c96e5e9dc853d92a3fe95a6f9fc73652 100644 (file)
@@ -11,8 +11,8 @@
   <configure name="LIB_VERSION" value="0x700"/>
   <configure name="LIB_VERSION_NUMBER" value="7,0,0,0"/>
   <configure name="SVN_REVISION" value="8113" />
-  <configure name="RELEASE_DATE" value="2012-06-02"/>
-  <configure name="CONFIGURE" value="./configure "/>
+  <configure name="RELEASE_DATE" value="2012-06-03"/>
+  <configure name="CONFIGURE" value="./configure  'CC=gcc'"/>
   <configure name="PREFIX" value="/usr/local"/>
   <configure name="EXEC-PREFIX" value="/usr/local"/>
   <configure name="INCLUDE_PATH" value="/usr/local/include/ImageMagick"/>
@@ -32,7 +32,7 @@
   <configure name="LIBS" value="-lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng15 -ldjvulibre -lfftw3 -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -pthread -lIlmImf -lImath -lHalf -lIex -lIlmThread -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl"/>
   <configure name="CXX" value="g++"/>
   <configure name="CXXFLAGS" value="-g -O2 -pthread"/>
-  <configure name="DISTCHECK_CONFIG_FLAGS" value="--disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-wmf=no --with-perl=no"/>
+  <configure name="DISTCHECK_CONFIG_FLAGS" value="'CC=gcc' --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-wmf=no --with-perl=no"/>
   <configure name="TARGET_CPU" value="x86_64"/>
   <configure name="TARGET_VENDOR" value="unknown"/>
   <configure name="TARGET_OS" value="linux-gnu"/>