]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 29 Aug 2012 00:06:25 +0000 (00:06 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 29 Aug 2012 00:06:25 +0000 (00:06 +0000)
MagickCore/image.c
MagickCore/pixel.c

index d58a7714fbf7128aa5f8c98d47277c6cbbefab2c..ec4388eded0b780089e470b0ba2b3512765fdbbb 100644 (file)
@@ -441,13 +441,15 @@ MagickExport Image *AppendImages(const Image *images,
     *append_image;
 
   MagickBooleanType
-    matte,
     proceed,
     status;
 
   MagickOffsetType
     n;
 
+  PixelTrait
+    alpha_trait;
+
   RectangleInfo
     geometry;
 
@@ -473,7 +475,7 @@ MagickExport Image *AppendImages(const Image *images,
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",images->filename);
   assert(exception != (ExceptionInfo *) NULL);
   assert(exception->signature == MagickSignature);
-  matte=images->alpha_trait;
+  alpha_trait=images->alpha_trait;
   number_images=1;
   width=images->columns;
   height=images->rows;
@@ -481,7 +483,7 @@ MagickExport Image *AppendImages(const Image *images,
   for ( ; next != (Image *) NULL; next=GetNextImageInList(next))
   {
     if (next->alpha_trait == BlendPixelTrait)
-      matte=MagickTrue;
+      alpha_trait=BlendPixelTrait;
     number_images++;
     if (stack != MagickFalse)
       {
@@ -505,7 +507,7 @@ MagickExport Image *AppendImages(const Image *images,
       append_image=DestroyImage(append_image);
       return((Image *) NULL);
     }
-  append_image->alpha_trait=matte;
+  append_image->alpha_trait=alpha_trait;
   (void) SetImageBackgroundColor(append_image,exception);
   status=MagickTrue;
   x_offset=0;
@@ -1167,7 +1169,7 @@ MagickExport MagickBooleanType GetImageAlphaChannel(const Image *image)
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
   assert(image->signature == MagickSignature);
-  return(image->alpha_trait);
+  return(image->alpha_trait == BlendPixelTrait ? MagickTrue : MagickFalse);
 }
 \f
 /*
@@ -3387,13 +3389,15 @@ MagickExport Image *SmushImages(const Image *images,
     *smush_image;
 
   MagickBooleanType
-    matte,
     proceed,
     status;
 
   MagickOffsetType
     n;
 
+  PixelTrait
+    alpha_trait;
+
   RectangleInfo
     geometry;
 
@@ -3419,7 +3423,7 @@ MagickExport Image *SmushImages(const Image *images,
   assert(exception != (ExceptionInfo *) NULL);
   assert(exception->signature == MagickSignature);
   image=images;
-  matte=image->alpha_trait;
+  alpha_trait=image->alpha_trait;
   number_images=1;
   width=image->columns;
   height=image->rows;
@@ -3427,7 +3431,7 @@ MagickExport Image *SmushImages(const Image *images,
   for ( ; next != (Image *) NULL; next=GetNextImageInList(next))
   {
     if (next->alpha_trait == BlendPixelTrait)
-      matte=MagickTrue;
+      alpha_trait=BlendPixelTrait;
     number_images++;
     if (stack != MagickFalse)
       {
@@ -3455,7 +3459,7 @@ MagickExport Image *SmushImages(const Image *images,
       smush_image=DestroyImage(smush_image);
       return((Image *) NULL);
     }
-  smush_image->alpha_trait=matte;
+  smush_image->alpha_trait=alpha_trait;
   (void) SetImageBackgroundColor(smush_image,exception);
   status=MagickTrue;
   x_offset=0;
index a1856c49b914ef0b24a3625e02bc528cb9b41ad8..1d88162dd9ad365db48e0aaec4ab5856a9c1ce73 100644 (file)
@@ -3992,38 +3992,39 @@ static inline double MagickMax(const double x,const double y)
   return(y);
 }
 
-static inline void CatromWeights(const double x,
-  double (*weights)[4])
+static inline void CatromWeights(const double x,double **weights)
 {
-  /*
-    Nicolas Robidoux' 10 flops (4* + 5- + 1+) refactoring of the
-    computation of the standard four 1D Catmull-Rom weights. The
-    sampling location is assumed between the second and third input
-    pixel locations, and x is the position relative to the second
-    input pixel location. Formulas originally derived for the VIPS
-    (Virtual Image Processing System) library.
-  */
   double
     alpha,
     beta,
     gamma;
 
+  /*
+    Nicolas Robidoux' 10 flops (4* + 5- + 1+) refactoring of the computation
+    of the standard four 1D Catmull-Rom weights. The sampling location is
+    assumed between the second and third input pixel locations, and x is the
+    position relative to the second input pixel location. Formulas originally
+    derived for the VIPS (Virtual Image Processing System) library.
+  */
   alpha=(double) 1.0-x;
   beta=(double) (-0.5)*x*alpha;
   (*weights)[0]=alpha*beta;
   (*weights)[3]=x*beta;
   /*
-    The following computation of the inner weights from the outer ones
-    works for all Keys cubics.
+    The following computation of the inner weights from the outer ones work
+    for all Keys cubics.
   */
   gamma=(*weights)[3]-(*weights)[0];
   (*weights)[1]=alpha-(*weights)[0]+gamma;
   (*weights)[2]=x-(*weights)[3]-gamma;
 }
 
-static inline void SplineWeights(const double x,
-  double (*weights)[4])
+static inline void SplineWeights(const double x,double **weights)
 {
+  double
+    alpha,
+    beta;
+
   /*
     Nicolas Robidoux' 12 flops (6* + 5- + 1+) refactoring of the
     computation of the standard four 1D cubic B-spline smoothing
@@ -4031,10 +4032,6 @@ static inline void SplineWeights(const double x,
     third input pixel locations, and x is the position relative to the
     second input pixel location.
   */
-  double
-    alpha,
-    beta;
-
   alpha=(double) 1.0-x;
   (*weights)[3]=(double) (1.0/6.0)*x*x*x;
   (*weights)[0]=(double) (1.0/6.0)*alpha*alpha*alpha;