*/
*q = p[r];
if (image->colorspace == CMYKColorspace)
- q_indexes[y] = p_indexes[r];
+ SetIndexPixelComponent(q_indexes+y,GetIndexPixelComponent(
+ p_indexes+r));
/* Set the bias of the weighted average output */
result.red =
*/
for (v=0; v < (ssize_t) kernel->height; v++) {
if ( IsNan(*k) ) continue;
- result.red += (*k)*k_pixels->red;
- result.green += (*k)*k_pixels->green;
- result.blue += (*k)*k_pixels->blue;
- result.opacity += (*k)*k_pixels->opacity;
+ result.red += (*k)*GetRedPixelComponent(k_pixels);
+ result.green += (*k)*GetGreenPixelComponent(k_pixels);
+ result.blue += (*k)*GetBluePixelComponent(k_pixels);
+ result.opacity += (*k)*GetOpacityPixelComponent(k_pixels);
if ( image->colorspace == CMYKColorspace)
result.index += (*k)*(*k_indexes);
k--;
k_indexes++;
}
if ((channel & RedChannel) != 0)
- q->red = ClampToQuantum(result.red);
+ SetRedPixelComponent(q,ClampToQuantum(result.red));
if ((channel & GreenChannel) != 0)
- q->green = ClampToQuantum(result.green);
+ SetGreenPixelComponent(q,ClampToQuantum(result.green));
if ((channel & BlueChannel) != 0)
- q->blue = ClampToQuantum(result.blue);
+ SetBluePixelComponent(q,ClampToQuantum(result.blue));
if ((channel & OpacityChannel) != 0
&& image->matte == MagickTrue )
- q->opacity = ClampToQuantum(result.opacity);
+ SetOpacityPixelComponent(q,ClampToQuantum(result.opacity));
if ((channel & IndexChannel) != 0
&& image->colorspace == CMYKColorspace)
- q_indexes[x] = ClampToQuantum(result.index);
+ SetIndexPixelComponent(q_indexes+x,ClampToQuantum(result.index));
}
else
{ /* Channel 'Sync' Flag, and Alpha Channel enabled.
gamma=0.0;
for (v=0; v < (ssize_t) kernel->height; v++) {
if ( IsNan(*k) ) continue;
- alpha=(*k)*(QuantumScale*(QuantumRange-k_pixels->opacity));
+ alpha=(*k)*(QuantumScale*(QuantumRange-GetOpacityPixelComponent(k_pixels)));
gamma += alpha;
- result.red += alpha*k_pixels->red;
- result.green += alpha*k_pixels->green;
- result.blue += alpha*k_pixels->blue;
- result.opacity += (*k)*k_pixels->opacity;
+ result.red += alpha*GetRedPixelComponent(k_pixels);
+ result.green += alpha*GetGreenPixelComponent(k_pixels);
+ result.blue += alpha*GetBluePixelComponent(k_pixels);
+ result.opacity += (*k)*GetOpacityPixelComponent(k_pixels);
if ( image->colorspace == CMYKColorspace)
result.index += alpha*(*k_indexes);
k--;
}
/* Sync'ed channels, all channels are modified */
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
- q->red = ClampToQuantum(gamma*result.red);
- q->green = ClampToQuantum(gamma*result.green);
- q->blue = ClampToQuantum(gamma*result.blue);
- q->opacity = ClampToQuantum(result.opacity);
+ SetRedPixelComponent(q,ClampToQuantum(gamma*result.red));
+ SetGreenPixelComponent(q,ClampToQuantum(gamma*result.green));
+ SetBluePixelComponent(q,ClampToQuantum(gamma*result.blue));
+ SetOpacityPixelComponent(q,ClampToQuantum(result.opacity));
if (image->colorspace == CMYKColorspace)
- q_indexes[x] = ClampToQuantum(gamma*result.index);
+ SetIndexPixelComponent(q_indexes+x,ClampToQuantum(gamma*
+ result.index));
}
/* Count up changed pixels */
- if ( ( p[r].red != q->red )
- || ( p[r].green != q->green )
- || ( p[r].blue != q->blue )
- || ( p[r].opacity != q->opacity )
+ if ( ( p[r].red != GetRedPixelComponent(q))
+ || ( p[r].green != GetGreenPixelComponent(q))
+ || ( p[r].blue != GetBluePixelComponent(q))
+ || ( p[r].opacity != GetOpacityPixelComponent(q))
|| ( image->colorspace == CMYKColorspace &&
- p_indexes[r] != q_indexes[x] ) )
+ GetIndexPixelComponent(p_indexes+r) != GetIndexPixelComponent(q_indexes+x) ) )
changed++; /* The pixel was changed in some way! */
p++;
q++;
*/
*q = p[r];
if (image->colorspace == CMYKColorspace)
- q_indexes[x] = p_indexes[r];
+ SetIndexPixelComponent(q_indexes+x,GetIndexPixelComponent(p_indexes+r));
/* Defaults */
min.red =
result.opacity = QuantumRange - (MagickRealType) p[r].opacity;
result.index = 0.0;
if ( image->colorspace == CMYKColorspace)
- result.index = (MagickRealType) p_indexes[r];
+ result.index = (MagickRealType) GetIndexPixelComponent(p_indexes+r);
switch (method) {
case ConvolveMorphology:
result.blue += (*k)*k_pixels[u].blue;
result.opacity += (*k)*k_pixels[u].opacity;
if ( image->colorspace == CMYKColorspace)
- result.index += (*k)*k_indexes[u];
+ result.index += (*k)*GetIndexPixelComponent(k_indexes+u);
}
k_pixels += virt_width;
k_indexes += virt_width;
}
if ((channel & RedChannel) != 0)
- q->red = ClampToQuantum(result.red);
+ SetRedPixelComponent(q,ClampToQuantum(result.red));
if ((channel & GreenChannel) != 0)
- q->green = ClampToQuantum(result.green);
+ SetGreenPixelComponent(q,ClampToQuantum(result.green));
if ((channel & BlueChannel) != 0)
- q->blue = ClampToQuantum(result.blue);
+ SetBluePixelComponent(q,ClampToQuantum(result.blue));
if ((channel & OpacityChannel) != 0
&& image->matte == MagickTrue )
- q->opacity = ClampToQuantum(result.opacity);
+ SetOpacityPixelComponent(q,ClampToQuantum(result.opacity));
if ((channel & IndexChannel) != 0
&& image->colorspace == CMYKColorspace)
- q_indexes[x] = ClampToQuantum(result.index);
+ SetIndexPixelComponent(q_indexes+x,ClampToQuantum(
+ result.index));
}
else
{ /* Channel 'Sync' Flag, and Alpha Channel enabled.
result.blue += alpha*k_pixels[u].blue;
result.opacity += (*k)*k_pixels[u].opacity;
if ( image->colorspace == CMYKColorspace)
- result.index += alpha*k_indexes[u];
+ result.index+=alpha*GetIndexPixelComponent(k_indexes+u);
}
k_pixels += virt_width;
k_indexes += virt_width;
}
/* Sync'ed channels, all channels are modified */
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
- q->red = ClampToQuantum(gamma*result.red);
- q->green = ClampToQuantum(gamma*result.green);
- q->blue = ClampToQuantum(gamma*result.blue);
- q->opacity = ClampToQuantum(result.opacity);
+ SetRedPixelComponent(q,ClampToQuantum(gamma*result.red));
+ SetGreenPixelComponent(q,ClampToQuantum(gamma*result.green));
+ SetBluePixelComponent(q,ClampToQuantum(gamma*result.blue));
+ SetOpacityPixelComponent(q,ClampToQuantum(result.opacity));
if (image->colorspace == CMYKColorspace)
- q_indexes[x] = ClampToQuantum(gamma*result.index);
+ SetIndexPixelComponent(q_indexes+x,ClampToQuantum(gamma*
+ result.index));
}
break;
Minimize(min.opacity,
QuantumRange-(double) k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Minimize(min.index, (double) k_indexes[u]);
+ Minimize(min.index,(double) GetIndexPixelComponent(
+ k_indexes+u));
}
k_pixels += virt_width;
k_indexes += virt_width;
Maximize(max.opacity,
QuantumRange-(double) k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Maximize(max.index, (double) k_indexes[u]);
+ Maximize(max.index, (double) GetIndexPixelComponent(
+ k_indexes+u));
}
k_pixels += virt_width;
k_indexes += virt_width;
Minimize(min.opacity,
QuantumRange-(double) k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Minimize(min.index, (double) k_indexes[u]);
+ Minimize(min.index,(double) GetIndexPixelComponent(
+ k_indexes+u));
}
else if ( (*k) < 0.3 )
{ /* maximum of background pixels */
Maximize(max.opacity,
QuantumRange-(double) k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Maximize(max.index, (double) k_indexes[u]);
+ Maximize(max.index, (double) GetIndexPixelComponent(
+ k_indexes+u));
}
}
k_pixels += virt_width;
Minimize(result.blue, (*k)+k_pixels[u].blue);
Minimize(result.opacity, (*k)+QuantumRange-k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Minimize(result.index, (*k)+k_indexes[u]);
+ Minimize(result.index,(*k)+GetIndexPixelComponent(
+ k_indexes+u));
}
k_pixels += virt_width;
k_indexes += virt_width;
break; /* full pixel was directly assigned - not a channel method */
default:
if ((channel & RedChannel) != 0)
- q->red = ClampToQuantum(result.red);
+ SetRedPixelComponent(q,ClampToQuantum(result.red));
if ((channel & GreenChannel) != 0)
- q->green = ClampToQuantum(result.green);
+ SetGreenPixelComponent(q,ClampToQuantum(result.green));
if ((channel & BlueChannel) != 0)
- q->blue = ClampToQuantum(result.blue);
+ SetBluePixelComponent(q,ClampToQuantum(result.blue));
if ((channel & OpacityChannel) != 0
&& image->matte == MagickTrue )
- q->opacity = ClampToQuantum(QuantumRange-result.opacity);
+ SetOpacityPixelComponent(q,ClampToQuantum(QuantumRange-result.opacity));
if ((channel & IndexChannel) != 0
&& image->colorspace == CMYKColorspace)
- q_indexes[x] = ClampToQuantum(result.index);
+ SetIndexPixelComponent(q_indexes+x,ClampToQuantum(result.index));
break;
}
/* Count up changed pixels */
- if ( ( p[r].red != q->red )
- || ( p[r].green != q->green )
- || ( p[r].blue != q->blue )
- || ( p[r].opacity != q->opacity )
+ if ( ( p[r].red != GetRedPixelComponent(q) )
+ || ( p[r].green != GetGreenPixelComponent(q) )
+ || ( p[r].blue != GetBluePixelComponent(q) )
+ || ( p[r].opacity != GetOpacityPixelComponent(q) )
|| ( image->colorspace == CMYKColorspace &&
- p_indexes[r] != q_indexes[x] ) )
+ GetIndexPixelComponent(p_indexes+r) != GetIndexPixelComponent(q_indexes+x) ) )
changed++; /* The pixel was changed in some way! */
p++;
q++;
Minimize(result.blue, (*k)+k_pixels[u].blue);
Minimize(result.opacity, (*k)+QuantumRange-k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Minimize(result.index, (*k)+k_indexes[u]);
+ Minimize(result.index, (*k)+GetIndexPixelComponent(k_indexes+u));
}
k_pixels += virt_width;
k_indexes += virt_width;
Minimize(result.blue, (*k)+k_pixels[u].blue);
Minimize(result.opacity, (*k)+QuantumRange-k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Minimize(result.index, (*k)+k_indexes[u]);
+ Minimize(result.index, (*k)+GetIndexPixelComponent(k_indexes+u));
}
break;
case VoronoiMorphology:
if( result.opacity > (*k)+k_pixels[u].opacity )
{
SetMagickPixelPacket(image,&k_pixels[u],&k_indexes[u],
- &result);
+ &result);
result.opacity += *k;
}
}
if( result.opacity > (*k)+k_pixels[u].opacity )
{
SetMagickPixelPacket(image,&k_pixels[u],&k_indexes[u],
- &result);
+ &result);
result.opacity += *k;
}
}
break;
default:
if ((channel & RedChannel) != 0)
- q->red = ClampToQuantum(result.red);
+ SetRedPixelComponent(q,ClampToQuantum(result.red));
if ((channel & GreenChannel) != 0)
- q->green = ClampToQuantum(result.green);
+ SetGreenPixelComponent(q,ClampToQuantum(result.green));
if ((channel & BlueChannel) != 0)
- q->blue = ClampToQuantum(result.blue);
+ SetBluePixelComponent(q,ClampToQuantum(result.blue));
if ((channel & OpacityChannel) != 0 && image->matte == MagickTrue )
- q->opacity = ClampToQuantum(QuantumRange-result.opacity);
+ SetOpacityPixelComponent(q,ClampToQuantum(QuantumRange-result.opacity));
if ((channel & IndexChannel) != 0
&& image->colorspace == CMYKColorspace)
- q_indexes[x] = ClampToQuantum(result.index);
+ SetIndexPixelComponent(q_indexes+x,ClampToQuantum(result.index));
break;
}
/* Count up changed pixels */
- if ( ( p[r].red != q->red )
- || ( p[r].green != q->green )
- || ( p[r].blue != q->blue )
- || ( p[r].opacity != q->opacity )
+ if ( ( p[r].red != GetRedPixelComponent(q) )
+ || ( p[r].green != GetGreenPixelComponent(q) )
+ || ( p[r].blue != GetBluePixelComponent(q) )
+ || ( p[r].opacity != GetOpacityPixelComponent(q) )
|| ( image->colorspace == CMYKColorspace &&
- p_indexes[r] != q_indexes[x] ) )
+ GetIndexPixelComponent(p_indexes+r) != GetIndexPixelComponent(q_indexes+x) ) )
changed++; /* The pixel was changed in some way! */
p++; /* increment pixel buffers */
Minimize(result.blue, (*k)+k_pixels[u].blue);
Minimize(result.opacity, (*k)+QuantumRange-k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Minimize(result.index, (*k)+k_indexes[u]);
+ Minimize(result.index,(*k)+GetIndexPixelComponent(k_indexes+u));
}
k_pixels += virt_width;
k_indexes += virt_width;
Minimize(result.blue, (*k)+k_pixels[u].blue);
Minimize(result.opacity, (*k)+QuantumRange-k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Minimize(result.index, (*k)+k_indexes[u]);
+ Minimize(result.index, (*k)+GetIndexPixelComponent(k_indexes+u));
}
break;
case VoronoiMorphology:
if( result.opacity > (*k)+k_pixels[u].opacity )
{
SetMagickPixelPacket(image,&k_pixels[u],&k_indexes[u],
- &result);
+ &result);
result.opacity += *k;
}
}
if( result.opacity > (*k)+k_pixels[u].opacity )
{
SetMagickPixelPacket(image,&k_pixels[u],&k_indexes[u],
- &result);
+ &result);
result.opacity += *k;
}
}
break;
default:
if ((channel & RedChannel) != 0)
- q->red = ClampToQuantum(result.red);
+ SetRedPixelComponent(q,ClampToQuantum(result.red));
if ((channel & GreenChannel) != 0)
- q->green = ClampToQuantum(result.green);
+ SetGreenPixelComponent(q,ClampToQuantum(result.green));
if ((channel & BlueChannel) != 0)
- q->blue = ClampToQuantum(result.blue);
+ SetBluePixelComponent(q,ClampToQuantum(result.blue));
if ((channel & OpacityChannel) != 0 && image->matte == MagickTrue )
- q->opacity = ClampToQuantum(QuantumRange-result.opacity);
+ SetOpacityPixelComponent(q,ClampToQuantum(QuantumRange-result.opacity));
if ((channel & IndexChannel) != 0
&& image->colorspace == CMYKColorspace)
- q_indexes[x] = ClampToQuantum(result.index);
+ SetIndexPixelComponent(q_indexes+x,ClampToQuantum(result.index));
break;
}
/* Count up changed pixels */
- if ( ( p[r].red != q->red )
- || ( p[r].green != q->green )
- || ( p[r].blue != q->blue )
- || ( p[r].opacity != q->opacity )
+ if ( ( p[r].red != GetRedPixelComponent(q) )
+ || ( p[r].green != GetGreenPixelComponent(q) )
+ || ( p[r].blue != GetBluePixelComponent(q) )
+ || ( p[r].opacity != GetOpacityPixelComponent(q) )
|| ( image->colorspace == CMYKColorspace &&
- p_indexes[r] != q_indexes[x] ) )
+ GetIndexPixelComponent(p_indexes+r) != GetIndexPixelComponent(q_indexes+x) ) )
changed++; /* The pixel was changed in some way! */
p--; /* go backward through pixel buffers */
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=ScaleQuantumToChar(indexes[x]);
+ *q=ScaleQuantumToChar(GetIndexPixelComponent(indexes+x));
break;
}
case IndexQuantum:
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=(double) (QuantumScale*indexes[x]);
+ *q=(double) (QuantumScale*GetIndexPixelComponent(indexes+x));
break;
}
case IndexQuantum:
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=(float) (QuantumScale*indexes[x]);
+ *q=(float) (QuantumScale*GetIndexPixelComponent(indexes+x));
break;
}
case IndexQuantum:
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=(unsigned int) ScaleQuantumToLong(indexes[x]);
+ *q=(unsigned int) ScaleQuantumToLong(GetIndexPixelComponent(indexes+x));
break;
}
case IndexQuantum:
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=ScaleQuantumToLong(indexes[x]);
+ *q=ScaleQuantumToLong(GetIndexPixelComponent(indexes+x));
break;
}
case IndexQuantum:
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=indexes[x];
+ *q=GetIndexPixelComponent(indexes+x);
break;
}
case IndexQuantum:
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=ScaleQuantumToShort(indexes[x]);
+ *q=ScaleQuantumToShort(GetIndexPixelComponent(indexes+x));
break;
}
case IndexQuantum:
SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- q->opacity=(Quantum) QuantumRange-ScaleCharToQuantum(*p++);
+ SetOpacityPixelComponent(q,QuantumRange-ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- q->opacity=(Quantum) QuantumRange-ScaleCharToQuantum(*p++);
+ SetOpacityPixelComponent(q,QuantumRange-ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
}
case AlphaQuantum:
{
- q->opacity=(Quantum) QuantumRange-ScaleCharToQuantum(*p);
+ SetOpacityPixelComponent(q,QuantumRange-ScaleCharToQuantum(*p));
break;
}
case OpacityQuantum:
SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- q->opacity=(Quantum) QuantumRange-ClampToQuantum((MagickRealType)
- QuantumRange*(*p));
+ SetOpacityPixelComponent(q,QuantumRange-ClampToQuantum(
+ (MagickRealType) QuantumRange*(*p)));
p++;
q++;
}
}
case AlphaQuantum:
{
- q->opacity=(Quantum) QuantumRange-ClampToQuantum(
- (MagickRealType) QuantumRange*(*p));
+ SetOpacityPixelComponent(q,QuantumRange-ClampToQuantum(
+ (MagickRealType) QuantumRange*(*p)));
break;
}
case OpacityQuantum:
}
case BlackQuantum:
{
- indexes[x]=ClampToQuantum((MagickRealType) QuantumRange*(*p));
+ SetIndexPixelComponent(indexes+x,ClampToQuantum(
+ (MagickRealType) QuantumRange*(*p)));
break;
}
case IndexQuantum:
SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- q->opacity=(Quantum) QuantumRange-ClampToQuantum((MagickRealType)
- QuantumRange*(*p));
+ SetOpacityPixelComponent(q,QuantumRange-ClampToQuantum(
+ (MagickRealType) QuantumRange*(*p)));
p++;
q++;
}
SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- q->opacity=(Quantum) QuantumRange-ClampToQuantum((MagickRealType)
- QuantumRange*(*p));
+ SetOpacityPixelComponent(q,QuantumRange-ClampToQuantum(
+ (MagickRealType) QuantumRange*(*p)));
p++;
q++;
}
}
case AlphaQuantum:
{
- q->opacity=(Quantum) QuantumRange-ClampToQuantum(
- (MagickRealType) QuantumRange*(*p));
+ SetOpacityPixelComponent(q,QuantumRange-ClampToQuantum(
+ (MagickRealType) QuantumRange*(*p)));
break;
}
case OpacityQuantum:
}
case BlackQuantum:
{
- indexes[x]=ClampToQuantum((MagickRealType) QuantumRange*(*p));
+ SetIndexPixelComponent(indexes+x,ClampToQuantum(
+ (MagickRealType) QuantumRange*(*p)));
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->red=ScaleLongToQuantum(*p++);
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->red=ScaleLongToQuantum(*p++);
- q->opacity=(Quantum) QuantumRange-ScaleLongToQuantum(*p++);
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetOpacityPixelComponent(q,QuantumRange-ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->red=ScaleLongToQuantum(*p++);
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleLongToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
q++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->blue=ScaleLongToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->blue=ScaleLongToQuantum(*p++);
- q->opacity=(Quantum) QuantumRange-ScaleLongToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetOpacityPixelComponent(q,QuantumRange-ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->blue=ScaleLongToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
p++;
q++;
}
case RedQuantum:
case CyanQuantum:
{
- q->red=ScaleLongToQuantum(*p);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- q->green=ScaleLongToQuantum(*p);
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- q->blue=ScaleLongToQuantum(*p);
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p));
break;
}
case AlphaQuantum:
{
- q->opacity=(Quantum) QuantumRange-ScaleLongToQuantum(*p);
+ SetOpacityPixelComponent(q,QuantumRange-ScaleLongToQuantum(*p));
break;
}
case OpacityQuantum:
{
- q->opacity=ScaleLongToQuantum(*p);
+ SetOpacityPixelComponent(q,ScaleLongToQuantum(*p));
break;
}
case BlackQuantum:
{
- indexes[x]=ScaleLongToQuantum(*p);
+ SetIndexPixelComponent(indexes+x,ScaleLongToQuantum(*p));
break;
}
case IndexQuantum:
{
- q->red=ScaleLongToQuantum(*p);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p));
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
break;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->red=ScaleLongToQuantum(*p++);
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->red=ScaleLongToQuantum(*p++);
- q->opacity=(Quantum) QuantumRange-ScaleLongToQuantum(*p++);
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetOpacityPixelComponent(q,QuantumRange-ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->red=ScaleLongToQuantum(*p++);
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleLongToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
q++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->blue=ScaleLongToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->blue=ScaleLongToQuantum(*p++);
- q->opacity=(Quantum) QuantumRange-ScaleLongToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetOpacityPixelComponent(q,QuantumRange-ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleLongToQuantum(*p++);
- q->green=ScaleLongToQuantum(*p++);
- q->blue=ScaleLongToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
p++;
q++;
}
case RedQuantum:
case CyanQuantum:
{
- q->red=ScaleLongToQuantum(*p);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- q->green=ScaleLongToQuantum(*p);
+ SetGreenPixelComponent(q,ScaleLongToQuantum(*p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- q->blue=ScaleLongToQuantum(*p);
+ SetBluePixelComponent(q,ScaleLongToQuantum(*p));
break;
}
case AlphaQuantum:
{
- q->opacity=(Quantum) QuantumRange-ScaleLongToQuantum(*p);
+ SetOpacityPixelComponent(q,QuantumRange-ScaleLongToQuantum(*p));
break;
}
case OpacityQuantum:
{
- q->opacity=ScaleLongToQuantum(*p);
+ SetOpacityPixelComponent(q,ScaleLongToQuantum(*p));
break;
}
case BlackQuantum:
{
- indexes[x]=ScaleLongToQuantum(*p);
+ SetIndexPixelComponent(indexes+x,ScaleLongToQuantum(*p));
break;
}
case IndexQuantum:
{
- q->red=ScaleLongToQuantum(*p);
+ SetRedPixelComponent(q,ScaleLongToQuantum(*p));
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
break;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=(*p++);
- q->green=(*p++);
- q->red=(*p++);
+ SetBluePixelComponent(q,*p++);
+ SetGreenPixelComponent(q,*p++);
+ SetRedPixelComponent(q,*p++);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=(*p++);
- q->green=(*p++);
- q->red=(*p++);
- q->opacity=(Quantum) QuantumRange-(*p++);
+ SetBluePixelComponent(q,*p++);
+ SetGreenPixelComponent(q,*p++);
+ SetRedPixelComponent(q,*p++);
+ SetOpacityPixelComponent(q,QuantumRange-(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=(*p++);
- q->green=(*p++);
- q->red=(*p++);
+ SetBluePixelComponent(q,*p++);
+ SetGreenPixelComponent(q,*p++);
+ SetRedPixelComponent(q,*p++);
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=(*p++);
+ SetRedPixelComponent(q,*p++);
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
q++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=(*p++);
- q->green=(*p++);
- q->blue=(*p++);
+ SetRedPixelComponent(q,*p++);
+ SetGreenPixelComponent(q,*p++);
+ SetBluePixelComponent(q,*p++);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=(*p++);
- q->green=(*p++);
- q->blue=(*p++);
- q->opacity=(Quantum) QuantumRange-(*p++);
+ SetRedPixelComponent(q,*p++);
+ SetGreenPixelComponent(q,*p++);
+ SetBluePixelComponent(q,*p++);
+ SetOpacityPixelComponent(q,QuantumRange-(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=(*p++);
- q->green=(*p++);
- q->blue=(*p++);
+ SetRedPixelComponent(q,*p++);
+ SetGreenPixelComponent(q,*p++);
+ SetBluePixelComponent(q,*p++);
p++;
q++;
}
case RedQuantum:
case CyanQuantum:
{
- q->red=(*p);
+ SetRedPixelComponent(q,*p);
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- q->green=(*p);
+ SetGreenPixelComponent(q,*p);
break;
}
case BlueQuantum:
case YellowQuantum:
{
- q->blue=(*p);
+ SetBluePixelComponent(q,*p);
break;
}
case AlphaQuantum:
{
- q->opacity=(Quantum) QuantumRange-(*p);
+ SetOpacityPixelComponent(q,QuantumRange-(*p));
break;
}
case OpacityQuantum:
{
- q->opacity=(*p);
+ SetOpacityPixelComponent(q,*p);
break;
}
case BlackQuantum:
{
- indexes[x]=(*p);
+ SetIndexPixelComponent(indexes+x,*p);
break;
}
case IndexQuantum:
{
- q->red=(*p);
+ SetRedPixelComponent(q,*p);
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
break;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=ScaleShortToQuantum(*p++);
- q->green=ScaleShortToQuantum(*p++);
- q->red=ScaleShortToQuantum(*p++);
+ SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=ScaleShortToQuantum(*p++);
- q->green=ScaleShortToQuantum(*p++);
- q->red=ScaleShortToQuantum(*p++);
- q->opacity=(Quantum) QuantumRange-ScaleShortToQuantum(*p++);
+ SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetOpacityPixelComponent(q,QuantumRange-ScaleShortToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->blue=ScaleShortToQuantum(*p++);
- q->green=ScaleShortToQuantum(*p++);
- q->red=ScaleShortToQuantum(*p++);
+ SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleShortToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
q++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleShortToQuantum(*p++);
- q->green=ScaleShortToQuantum(*p++);
- q->blue=ScaleShortToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleShortToQuantum(*p++);
- q->green=ScaleShortToQuantum(*p++);
- q->blue=ScaleShortToQuantum(*p++);
- q->opacity=(Quantum) QuantumRange-ScaleShortToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
+ SetOpacityPixelComponent(q,QuantumRange-ScaleShortToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- q->red=ScaleShortToQuantum(*p++);
- q->green=ScaleShortToQuantum(*p++);
- q->blue=ScaleShortToQuantum(*p++);
+ SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
p++;
q++;
}
case RedQuantum:
case CyanQuantum:
{
- q->red=ScaleShortToQuantum(*p);
+ SetRedPixelComponent(q,ScaleShortToQuantum(*p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- q->green=ScaleShortToQuantum(*p);
+ SetGreenPixelComponent(q,ScaleShortToQuantum(*p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- q->blue=ScaleShortToQuantum(*p);
+ SetBluePixelComponent(q,ScaleShortToQuantum(*p));
break;
}
case AlphaQuantum:
{
- q->opacity=(Quantum) QuantumRange-ScaleShortToQuantum(*p);
+ SetOpacityPixelComponent(q,QuantumRange-ScaleShortToQuantum(*p));
break;
}
case OpacityQuantum:
{
- q->opacity=ScaleShortToQuantum(*p);
+ SetOpacityPixelComponent(q,ScaleShortToQuantum(*p));
break;
}
case BlackQuantum:
{
- indexes[x]=ScaleShortToQuantum(*p);
+ SetIndexPixelComponent(indexes+x,ScaleShortToQuantum(*p));
break;
}
case IndexQuantum:
{
- q->red=ScaleShortToQuantum(*p);
+ SetRedPixelComponent(q,ScaleShortToQuantum(*p));
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
break;