status;
MagickPixelPacket
- zero;
+ bias;
MagickRealType
alpha,
- bias,
normalize;
register long
*/
status=MagickTrue;
progress=0;
- bias=image->bias;
- GetMagickPixelPacket(image,&zero);
+ GetMagickPixelPacket(image,&bias);
+ SetMagickPixelPacketBias(image,&bias);
image_view=AcquireCacheView(image);
edge_view=AcquireCacheView(edge_image);
blur_view=AcquireCacheView(blur_image);
if (p == (const PixelPacket *) NULL)
break;
indexes=GetCacheViewVirtualIndexQueue(image_view);
- pixel=zero;
+ pixel=bias;
k=kernel[i];
for (v=0; v < (long) (width-i); v++)
{
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- q->red=RoundToQuantum(gamma*pixel.red+bias);
+ q->red=RoundToQuantum(gamma*pixel.red);
if ((channel & GreenChannel) != 0)
- q->green=RoundToQuantum(gamma*pixel.green+bias);
+ q->green=RoundToQuantum(gamma*pixel.green);
if ((channel & BlueChannel) != 0)
- q->blue=RoundToQuantum(gamma*pixel.blue+bias);
+ q->blue=RoundToQuantum(gamma*pixel.blue);
if ((channel & OpacityChannel) != 0)
- q->opacity=RoundToQuantum(pixel.opacity+bias);
+ q->opacity=RoundToQuantum(pixel.opacity);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- blur_indexes[x]=RoundToQuantum(gamma*pixel.index+bias);
+ blur_indexes[x]=RoundToQuantum(gamma*pixel.index);
q++;
r++;
}
status;
MagickPixelPacket
- zero;
+ bias;
MagickRealType
alpha,
- bias,
normalize;
register long
*/
status=MagickTrue;
progress=0;
- bias=image->bias;
- GetMagickPixelPacket(image,&zero);
+ GetMagickPixelPacket(image,&bias);
+ SetMagickPixelPacketBias(image,&bias);
image_view=AcquireCacheView(image);
edge_view=AcquireCacheView(edge_image);
sharp_view=AcquireCacheView(sharp_image);
break;
indexes=GetCacheViewVirtualIndexQueue(image_view);
k=kernel[i];
- pixel=zero;
+ pixel=bias;
for (v=0; v < (long) (width-i); v++)
{
for (u=0; u < (long) (width-i); u++)
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- q->red=RoundToQuantum(gamma*pixel.red+bias);
+ q->red=RoundToQuantum(gamma*pixel.red);
if ((channel & GreenChannel) != 0)
- q->green=RoundToQuantum(gamma*pixel.green+bias);
+ q->green=RoundToQuantum(gamma*pixel.green);
if ((channel & BlueChannel) != 0)
- q->blue=RoundToQuantum(gamma*pixel.blue+bias);
+ q->blue=RoundToQuantum(gamma*pixel.blue);
if ((channel & OpacityChannel) != 0)
- q->opacity=RoundToQuantum(pixel.opacity+bias);
+ q->opacity=RoundToQuantum(pixel.opacity);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- sharp_indexes[x]=RoundToQuantum(gamma*pixel.index+bias);
+ sharp_indexes[x]=RoundToQuantum(gamma*pixel.index);
q++;
r++;
}
{
alpha=exp((-((double) (i*i))/(double) (2.0*KernelRank*KernelRank*
MagickSigma*MagickSigma)));
- kernel[(i+bias)/KernelRank]+=(double) (alpha/(MagickSQ2PI*sigma));
+ kernel[(i)/KernelRank]+=(double) (alpha/(MagickSQ2PI*sigma));
}
normalize=0.0;
for (i=0; i < (long) width; i++)
status;
MagickPixelPacket
- zero;
-
- MagickRealType
bias;
register long
*/
status=MagickTrue;
progress=0;
- GetMagickPixelPacket(image,&zero);
- bias=image->bias;
+ GetMagickPixelPacket(image,&bias);
+ SetMagickPixelPacketBias(image,&bias);
image_view=AcquireCacheView(image);
blur_view=AcquireCacheView(blur_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203)
register long
i;
- pixel=zero;
+ pixel=bias;
k=kernel;
kernel_pixels=p;
if (((channel & OpacityChannel) == 0) || (image->matte == MagickFalse))
kernel_pixels++;
}
if ((channel & RedChannel) != 0)
- q->red=RoundToQuantum(pixel.red+bias);
+ q->red=RoundToQuantum(pixel.red);
if ((channel & GreenChannel) != 0)
- q->green=RoundToQuantum(pixel.green+bias);
+ q->green=RoundToQuantum(pixel.green);
if ((channel & BlueChannel) != 0)
- q->blue=RoundToQuantum(pixel.blue+bias);
+ q->blue=RoundToQuantum(pixel.blue);
if ((channel & OpacityChannel) != 0)
{
k=kernel;
k++;
kernel_pixels++;
}
- q->opacity=RoundToQuantum(pixel.opacity+bias);
+ q->opacity=RoundToQuantum(pixel.opacity);
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
k++;
kernel_indexes++;
}
- blur_indexes[x]=RoundToQuantum(pixel.index+bias);
+ blur_indexes[x]=RoundToQuantum(pixel.index);
}
}
else
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- q->red=RoundToQuantum(gamma*pixel.red+bias);
+ q->red=RoundToQuantum(gamma*pixel.red);
if ((channel & GreenChannel) != 0)
- q->green=RoundToQuantum(gamma*pixel.green+bias);
+ q->green=RoundToQuantum(gamma*pixel.green);
if ((channel & BlueChannel) != 0)
- q->blue=RoundToQuantum(gamma*pixel.blue+bias);
+ q->blue=RoundToQuantum(gamma*pixel.blue);
if ((channel & OpacityChannel) != 0)
{
k=kernel;
k++;
kernel_pixels++;
}
- q->opacity=RoundToQuantum(pixel.opacity+bias);
+ q->opacity=RoundToQuantum(pixel.opacity);
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
kernel_pixels++;
kernel_indexes++;
}
- blur_indexes[x]=RoundToQuantum(gamma*pixel.index+bias);
+ blur_indexes[x]=RoundToQuantum(gamma*pixel.index);
}
}
p++;
register long
i;
- pixel=zero;
+ pixel=bias;
k=kernel;
kernel_pixels=p;
if (((channel & OpacityChannel) == 0) || (image->matte == MagickFalse))
kernel_pixels++;
}
if ((channel & RedChannel) != 0)
- q->red=RoundToQuantum(pixel.red+bias);
+ q->red=RoundToQuantum(pixel.red);
if ((channel & GreenChannel) != 0)
- q->green=RoundToQuantum(pixel.green+bias);
+ q->green=RoundToQuantum(pixel.green);
if ((channel & BlueChannel) != 0)
- q->blue=RoundToQuantum(pixel.blue+bias);
+ q->blue=RoundToQuantum(pixel.blue);
if ((channel & OpacityChannel) != 0)
{
k=kernel;
k++;
kernel_pixels++;
}
- q->opacity=RoundToQuantum(pixel.opacity+bias);
+ q->opacity=RoundToQuantum(pixel.opacity);
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
k++;
kernel_indexes++;
}
- blur_indexes[y]=RoundToQuantum(pixel.index+bias);
+ blur_indexes[y]=RoundToQuantum(pixel.index);
}
}
else
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- q->red=RoundToQuantum(gamma*pixel.red+bias);
+ q->red=RoundToQuantum(gamma*pixel.red);
if ((channel & GreenChannel) != 0)
- q->green=RoundToQuantum(gamma*pixel.green+bias);
+ q->green=RoundToQuantum(gamma*pixel.green);
if ((channel & BlueChannel) != 0)
- q->blue=RoundToQuantum(gamma*pixel.blue+bias);
+ q->blue=RoundToQuantum(gamma*pixel.blue);
if ((channel & OpacityChannel) != 0)
{
k=kernel;
k++;
kernel_pixels++;
}
- q->opacity=RoundToQuantum(pixel.opacity+bias);
+ q->opacity=RoundToQuantum(pixel.opacity);
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
kernel_pixels++;
kernel_indexes++;
}
- blur_indexes[y]=RoundToQuantum(gamma*pixel.index+bias);
+ blur_indexes[y]=RoundToQuantum(gamma*pixel.index);
}
}
p++;
status;
MagickPixelPacket
- zero;
+ bias;
OffsetInfo
*offset;
*/
status=MagickTrue;
progress=0;
- GetMagickPixelPacket(image,&zero);
+ GetMagickPixelPacket(image,&bias);
image_view=AcquireCacheView(image);
blur_view=AcquireCacheView(blur_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203)
*__restrict indexes;
k=kernel;
- qixel=zero;
+ qixel=bias;
if (((channel & OpacityChannel) == 0) || (image->matte == MagickFalse))
{
for (i=0; i < (long) width; i++)
status;
MagickPixelPacket
- zero;
+ bias;
MagickRealType
blur_radius,
*/
status=MagickTrue;
progress=0;
- GetMagickPixelPacket(image,&zero);
+ GetMagickPixelPacket(image,&bias);
image_view=AcquireCacheView(image);
blur_view=AcquireCacheView(blur_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203)
step=n-1;
}
normalize=0.0;
- qixel=zero;
+ qixel=bias;
if (((channel & OpacityChannel) == 0) || (image->matte == MagickFalse))
{
for (i=0; i < (long) n; i+=step)
status;
MagickPixelPacket
- zero;
-
- MagickRealType
bias;
register long
*/
status=MagickTrue;
progress=0;
- GetMagickPixelPacket(image,&zero);
- bias=image->bias;
+ GetMagickPixelPacket(image,&bias);
+ SetMagickPixelPacketBias(image,&bias);
image_view=AcquireCacheView(image);
blur_view=AcquireCacheView(blur_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203)
register long
u;
- pixel=zero;
+ pixel=bias;
k=kernel;
gamma=0.0;
j=0;
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- q->red=RoundToQuantum(gamma*pixel.red+bias);
+ q->red=RoundToQuantum(gamma*pixel.red);
if ((channel & GreenChannel) != 0)
- q->green=RoundToQuantum(gamma*pixel.green+bias);
+ q->green=RoundToQuantum(gamma*pixel.green);
if ((channel & BlueChannel) != 0)
- q->blue=RoundToQuantum(gamma*pixel.blue+bias);
+ q->blue=RoundToQuantum(gamma*pixel.blue);
}
if ((channel & OpacityChannel) != 0)
{
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 :
gamma);
- q->opacity=RoundToQuantum(gamma*pixel.opacity+bias);
+ q->opacity=RoundToQuantum(gamma*pixel.opacity);
}
}
if (((channel & IndexChannel) != 0) &&
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 :
gamma);
- blur_indexes[x]=RoundToQuantum(gamma*pixel.index+bias);
+ blur_indexes[x]=RoundToQuantum(gamma*pixel.index);
}
}
}
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- q->red=RoundToQuantum(gamma*pixel.red+bias);
+ q->red=RoundToQuantum(gamma*pixel.red);
if ((channel & GreenChannel) != 0)
- q->green=RoundToQuantum(gamma*pixel.green+bias);
+ q->green=RoundToQuantum(gamma*pixel.green);
if ((channel & BlueChannel) != 0)
- q->blue=RoundToQuantum(gamma*pixel.blue+bias);
+ q->blue=RoundToQuantum(gamma*pixel.blue);
}
if ((channel & OpacityChannel) != 0)
{
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 :
gamma);
- q->opacity=RoundToQuantum(pixel.opacity+bias);
+ q->opacity=RoundToQuantum(pixel.opacity);
}
}
if (((channel & IndexChannel) != 0) &&
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 :
gamma);
- blur_indexes[x]=RoundToQuantum(gamma*pixel.index+bias);
+ blur_indexes[x]=RoundToQuantum(gamma*pixel.index);
}
}
}
status;
MagickPixelPacket
- zero;
+ bias;
RandomInfo
**random_info;
*/
status=MagickTrue;
progress=0;
- GetMagickPixelPacket(spread_image,&zero);
+ GetMagickPixelPacket(spread_image,&bias);
width=GetOptimalKernelWidth1D(radius,0.5);
resample_filter=AcquireResampleFilterThreadSet(image,MagickTrue,exception);
random_info=AcquireRandomInfoThreadSet();
continue;
}
indexes=GetCacheViewAuthenticIndexQueue(image_view);
- pixel=zero;
+ pixel=bias;
id=GetOpenMPThreadId();
for (x=0; x < (long) spread_image->columns; x++)
{
status;
MagickPixelPacket
- zero;
+ bias;
MagickRealType
quantum_threshold;
*/
status=MagickTrue;
progress=0;
- GetMagickPixelPacket(image,&zero);
+ GetMagickPixelPacket(image,&bias);
image_view=AcquireCacheView(image);
unsharp_view=AcquireCacheView(unsharp_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203)
}
indexes=GetCacheViewVirtualIndexQueue(image_view);
unsharp_indexes=GetCacheViewAuthenticIndexQueue(unsharp_view);
- pixel=zero;
+ pixel=bias;
for (x=0; x < (long) image->columns; x++)
{
if ((channel & RedChannel) != 0)
status;
MagickPixelPacket
- zero;
+ bias;
MagickRealType
- bias,
gamma;
register long
*/
status=MagickTrue;
progress=0;
- GetMagickPixelPacket(image,&zero);
- bias=image->bias;
+ GetMagickPixelPacket(image,&bias);
+ SetMagickPixelPacketBias(image,&bias);
image_view=AcquireCacheView(image);
convolve_view=AcquireCacheView(convolve_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203)
register long
u;
- pixel=zero;
+ pixel=bias;
k=normal_kernel;
kernel_pixels=p;
if (((channel & OpacityChannel) == 0) || (image->matte == MagickFalse))
kernel_pixels+=image->columns+width;
}
if ((channel & RedChannel) != 0)
- q->red=RoundToQuantum(pixel.red+bias);
+ q->red=RoundToQuantum(pixel.red);
if ((channel & GreenChannel) != 0)
- q->green=RoundToQuantum(pixel.green+bias);
+ q->green=RoundToQuantum(pixel.green);
if ((channel & BlueChannel) != 0)
- q->blue=RoundToQuantum(pixel.blue+bias);
+ q->blue=RoundToQuantum(pixel.blue);
if ((channel & OpacityChannel) != 0)
{
k=normal_kernel;
}
kernel_pixels+=image->columns+width;
}
- q->opacity=RoundToQuantum(pixel.opacity+bias);
+ q->opacity=RoundToQuantum(pixel.opacity);
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
}
kernel_indexes+=image->columns+width;
}
- convolve_indexes[x]=RoundToQuantum(pixel.index+bias);
+ convolve_indexes[x]=RoundToQuantum(pixel.index);
}
}
else
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- q->red=RoundToQuantum(gamma*pixel.red+bias);
+ q->red=RoundToQuantum(gamma*pixel.red);
if ((channel & GreenChannel) != 0)
- q->green=RoundToQuantum(gamma*pixel.green+bias);
+ q->green=RoundToQuantum(gamma*pixel.green);
if ((channel & BlueChannel) != 0)
- q->blue=RoundToQuantum(gamma*pixel.blue+bias);
+ q->blue=RoundToQuantum(gamma*pixel.blue);
if ((channel & OpacityChannel) != 0)
{
k=normal_kernel;
}
kernel_pixels+=image->columns+width;
}
- q->opacity=RoundToQuantum(pixel.opacity+bias);
+ q->opacity=RoundToQuantum(pixel.opacity);
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
kernel_pixels+=image->columns+width;
kernel_indexes+=image->columns+width;
}
- convolve_indexes[x]=RoundToQuantum(gamma*pixel.index+bias);
+ convolve_indexes[x]=RoundToQuantum(gamma*pixel.index);
}
}
p++;