}
case IndexQuantum:
{
- *q=ScaleQuantumToLongLong(ClampToQuantum(GetPixelIntensity(image,p)));
+ *q=ScaleQuantumToLongLong(ClampToQuantum(
+ GetPixelIntensity(image,p)));
break;
}
default:
}
}
-MagickExport MagickBooleanType ExportImagePixels(Image *image,
- const ssize_t x,const ssize_t y,const size_t width,const size_t height,
- const char *map,const StorageType type,void *pixels,ExceptionInfo *exception)
+MagickExport MagickBooleanType ExportImagePixels(Image *image,const ssize_t x,
+ const ssize_t y,const size_t width,const size_t height,const char *map,
+ const StorageType type,void *pixels,ExceptionInfo *exception)
{
QuantumType
*quantum_map;
beta;
/*
- Nicolas Robidoux' 12 flops (6* + 5- + 1+) refactoring of the
- computation of the standard four 1D cubic B-spline smoothing
- 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.
+ Nicolas Robidoux' 12 flops (6* + 5- + 1+) refactoring of the computation
+ of the standard four 1D cubic B-spline smoothing 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.
*/
alpha=(double) 1.0-x;
(*weights)[3]=(double) (1.0/6.0)*x*x*x;
const PixelInterpolateMethod method,const double x,const double y,
double *pixel,ExceptionInfo *exception)
{
- MagickBooleanType
- status;
-
double
alpha[16],
gamma,
pixels[16];
+ MagickBooleanType
+ status;
+
+ PixelInterpolateMethod
+ interpolate;
+
PixelTrait
traits;
x_offset,
y_offset;
- PixelInterpolateMethod
- interpolate;
-
assert(image != (Image *) NULL);
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
interpolate = image->interpolate;
switch (interpolate)
{
- case AverageInterpolatePixel: /* nearest 4 neighbours */
- case Average9InterpolatePixel: /* nearest 9 neighbours */
- case Average16InterpolatePixel: /* nearest 16 neighbours */
+ case AverageInterpolatePixel: /* nearest 4 neighbours */
+ case Average9InterpolatePixel: /* nearest 9 neighbours */
+ case Average16InterpolatePixel: /* nearest 16 neighbours */
{
ssize_t
count;
status=MagickFalse;
break;
}
- count*=count; /* Number of pixels to Average */
+ count*=count; /* Number of pixels to average */
if ((traits & BlendPixelTrait) == 0)
for (i=0; i < (ssize_t) count; i++)
{
GetPixelChannels(image));
pixels[i]=alpha[i]*p[i*GetPixelChannels(image)+channel];
}
- gamma=1.0; /* number of pixels blended together (its variable) */
+ gamma=1.0; /* number of pixels blended together (its variable) */
for (i=0; i <= 1L; i++) {
if ((y-y_offset) >= 0.75)
{
pixels[0]+=pixels[1];
}
if (channel != AlphaPixelChannel)
- gamma=PerceptibleReciprocal(alpha[0]); /* (color) 1/alpha_weights */
+ gamma=PerceptibleReciprocal(alpha[0]); /* (color) 1/alpha_weights */
else
- gamma=PerceptibleReciprocal(gamma); /* (alpha) 1/number_of_pixels */
+ gamma=PerceptibleReciprocal(gamma); /* (alpha) 1/number_of_pixels */
*pixel=gamma*pixels[0];
break;
}
interpolate = source->interpolate;
switch (interpolate)
{
- case AverageInterpolatePixel: /* nearest 4 neighbours */
- case Average9InterpolatePixel: /* nearest 9 neighbours */
- case Average16InterpolatePixel: /* nearest 16 neighbours */
+ case AverageInterpolatePixel: /* nearest 4 neighbours */
+ case Average9InterpolatePixel: /* nearest 9 neighbours */
+ case Average16InterpolatePixel: /* nearest 16 neighbours */
{
ssize_t
count;
status=MagickFalse;
break;
}
- count*=count; /* Number of pixels to Average */
+ count*=count; /* Number of pixels to average */
for (i=0; i < (ssize_t) GetPixelChannels(source); i++)
{
double
else
if ((y-y_offset) > 0.25)
{
- gamma=2.0; /* blend both pixels in row */
+ gamma=2.0; /* blend both pixels in row */
alpha[j]+=alpha[j+2]; /* add up alpha weights */
pixels[j]+=pixels[j+2];
}
pixels[0]+=pixels[1];
}
if ((traits & BlendPixelTrait) == 0)
- gamma=PerceptibleReciprocal(alpha[0]); /* (color) 1/alpha_weights */
+ gamma=PerceptibleReciprocal(alpha[0]); /* (color) 1/alpha_weights */
else
- gamma=PerceptibleReciprocal(gamma); /* (alpha) 1/number_of_pixels */
+ gamma=PerceptibleReciprocal(gamma); /* (alpha) 1/number_of_pixels */
SetPixelChannel(destination,channel,ClampToQuantum(gamma*pixels[0]),
pixel);
}
interpolate = image->interpolate;
switch (interpolate)
{
- case AverageInterpolatePixel: /* nearest 4 neighbours */
- case Average9InterpolatePixel: /* nearest 9 neighbours */
- case Average16InterpolatePixel: /* nearest 16 neighbours */
+ case AverageInterpolatePixel: /* nearest 4 neighbours */
+ case Average9InterpolatePixel: /* nearest 9 neighbours */
+ case Average16InterpolatePixel: /* nearest 16 neighbours */
{
ssize_t
count;
pixel->blue=0.0;
pixel->black=0.0;
pixel->alpha=0.0;
- count*=count; /* number of pixels - square of size */
+ count*=count; /* number of pixels - square of size */
for (i=0; i < (ssize_t) count; i++)
{
AlphaBlendPixelInfo(image,p,pixels,alpha);
if ((x-x_offset) > 0.25)
{
gamma*=2.0; /* blend both rows */
- alpha[0]+= alpha[1]; /* add up alpha weights */
+ alpha[0]+= alpha[1]; /* add up alpha weights */
pixels[0].red+=pixels[1].red;
pixels[0].green+=pixels[1].green;
pixels[0].blue+=pixels[1].blue;
(p->colorspace == HWBColorspace))
{
/*
- This calculates a arc distance for hue-- it should be a vector angle
- of 'S'/'W' length with 'L'/'B' forming appropriate cones. In other
- words this is a hack - Anthony.
+ This calculates a arc distance for hue-- it should be a vector
+ angle of 'S'/'W' length with 'L'/'B' forming appropriate cones.
+ In other words this is a hack - Anthony.
*/
if (fabs((double) pixel) > (QuantumRange/2))
pixel-=QuantumRange;