*append_image;
MagickBooleanType
- matte,
proceed,
status;
MagickOffsetType
n;
+ PixelTrait
+ alpha_trait;
+
RectangleInfo
geometry;
(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;
for ( ; next != (Image *) NULL; next=GetNextImageInList(next))
{
if (next->alpha_trait == BlendPixelTrait)
- matte=MagickTrue;
+ alpha_trait=BlendPixelTrait;
number_images++;
if (stack != MagickFalse)
{
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;
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(image->signature == MagickSignature);
- return(image->alpha_trait);
+ return(image->alpha_trait == BlendPixelTrait ? MagickTrue : MagickFalse);
}
\f
/*
*smush_image;
MagickBooleanType
- matte,
proceed,
status;
MagickOffsetType
n;
+ PixelTrait
+ alpha_trait;
+
RectangleInfo
geometry;
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;
for ( ; next != (Image *) NULL; next=GetNextImageInList(next))
{
if (next->alpha_trait == BlendPixelTrait)
- matte=MagickTrue;
+ alpha_trait=BlendPixelTrait;
number_images++;
if (stack != MagickFalse)
{
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;
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
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;