indexes=GetCacheViewAuthenticIndexQueue(image_view);
items=sscanf(SvPV(sval,na),"%ld",&index);
if ((index >= 0) && (index < (ssize_t) image->colors))
- SetIndexPixelComponent(indexes,index);
+ SetPixelIndex(indexes,index);
(void) SyncCacheViewAuthenticPixels(image_view,exception);
}
image_view=DestroyCacheView(image_view);
if ((flags & ChiValue) != 0)
pixel.index=geometry_info.chi;
}
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelRed(q,ClampToQuantum(pixel.red));
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
if (((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass)) &&
(indexes != (IndexPacket *) NULL))
- SetIndexPixelComponent(indexes,ClampToQuantum(pixel.index));
+ SetPixelIndex(indexes,ClampToQuantum(pixel.index));
(void) SyncCacheViewAuthenticPixels(image_view,exception);
}
image_view=DestroyCacheView(image_view);
{
indexes=GetCacheViewVirtualIndexQueue(image_view);
(void) FormatLocaleString(name,MaxTextExtent,QuantumFormat,
- GetIndexPixelComponent(indexes));
+ GetPixelIndex(indexes));
s=newSVpv(name,0);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
}
if (image->colorspace != CMYKColorspace)
(void) FormatLocaleString(tuple,MaxTextExtent,QuantumFormat ","
QuantumFormat "," QuantumFormat "," QuantumFormat,
- GetRedPixelComponent(p),GetGreenPixelComponent(p),
- GetBluePixelComponent(p),GetOpacityPixelComponent(p));
+ GetPixelRed(p),GetPixelGreen(p),
+ GetPixelBlue(p),GetPixelOpacity(p));
else
(void) FormatLocaleString(tuple,MaxTextExtent,QuantumFormat ","
QuantumFormat "," QuantumFormat "," QuantumFormat ","
- QuantumFormat,GetRedPixelComponent(p),
- GetGreenPixelComponent(p),GetBluePixelComponent(p),
- GetIndexPixelComponent(indexes),GetOpacityPixelComponent(p));
+ QuantumFormat,GetPixelRed(p),
+ GetPixelGreen(p),GetPixelBlue(p),
+ GetPixelIndex(indexes),GetPixelOpacity(p));
s=newSVpv(tuple,0);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
if (normalize != MagickFalse)
scale=1.0/QuantumRange;
if ((channel & RedChannel) != 0)
- PUSHs(sv_2mortal(newSVnv(scale*GetRedPixelComponent(p))));
+ PUSHs(sv_2mortal(newSVnv(scale*GetPixelRed(p))));
if ((channel & GreenChannel) != 0)
- PUSHs(sv_2mortal(newSVnv(scale*GetGreenPixelComponent(p))));
+ PUSHs(sv_2mortal(newSVnv(scale*GetPixelGreen(p))));
if ((channel & BlueChannel) != 0)
- PUSHs(sv_2mortal(newSVnv(scale*GetBluePixelComponent(p))));
+ PUSHs(sv_2mortal(newSVnv(scale*GetPixelBlue(p))));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- PUSHs(sv_2mortal(newSVnv(scale*GetIndexPixelComponent(indexes))));
+ PUSHs(sv_2mortal(newSVnv(scale*GetPixelIndex(indexes))));
if ((channel & OpacityChannel) != 0)
- PUSHs(sv_2mortal(newSVnv(scale*GetOpacityPixelComponent(p))));
+ PUSHs(sv_2mortal(newSVnv(scale*GetPixelOpacity(p))));
}
PerlException:
scale=QuantumRange;
if (((channel & RedChannel) != 0) && (i <= av_len(av)))
{
- SetRedPixelComponent(q,ClampToQuantum(scale*SvNV(*(
+ SetPixelRed(q,ClampToQuantum(scale*SvNV(*(
av_fetch(av,i,0)))));
i++;
}
if (((channel & GreenChannel) != 0) && (i <= av_len(av)))
{
- SetGreenPixelComponent(q,ClampToQuantum(scale*SvNV(*(
+ SetPixelGreen(q,ClampToQuantum(scale*SvNV(*(
av_fetch(av,i,0)))));
i++;
}
if (((channel & BlueChannel) != 0) && (i <= av_len(av)))
{
- SetBluePixelComponent(q,ClampToQuantum(scale*SvNV(*(
+ SetPixelBlue(q,ClampToQuantum(scale*SvNV(*(
av_fetch(av,i,0)))));
i++;
}
if ((((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace)) && (i <= av_len(av)))
{
- SetIndexPixelComponent(indexes,ClampToQuantum(scale*
+ SetPixelIndex(indexes,ClampToQuantum(scale*
SvNV(*(av_fetch(av,i,0)))));
i++;
}
if (((channel & OpacityChannel) != 0) && (i <= av_len(av)))
{
- SetOpacityPixelComponent(q,ClampToQuantum(scale*
+ SetPixelOpacity(q,ClampToQuantum(scale*
SvNV(*(av_fetch(av,i,0)))));
i++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
if (*p == 254)
*p=255;
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelAlpha(q,ScaleCharToQuantum(*p++));
if (q->opacity != OpaqueOpacity)
image->matte=MagickTrue;
q++;
q=pixels;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
*q=ScaleQuantumToChar((Quantum) (QuantumRange-(image->matte !=
- MagickFalse ? GetOpacityPixelComponent(p) : OpaqueOpacity)));
+ MagickFalse ? GetPixelOpacity(p) : OpaqueOpacity)));
if (*q == 255)
*q=254;
p++;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*p++));
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelAlpha(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
if (q->opacity != OpaqueOpacity)
image->matte=MagickTrue;
q++;
for (x=0; x < (ssize_t) image->columns; x++)
{
*q++=ScaleQuantumToChar((Quantum) (QuantumRange-(image->matte !=
- MagickFalse ? GetOpacityPixelComponent(p) : OpaqueOpacity)));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ MagickFalse ? GetPixelOpacity(p) : OpaqueOpacity)));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
count=WriteBlob(image,(size_t) (q-pixels),pixels);
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
{
case RedQuantum:
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
break;
}
case GreenQuantum:
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
break;
}
case BlueQuantum:
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
break;
}
case AlphaQuantum:
{
- SetAlphaPixelComponent(q,GetAlphaPixelComponent(p));
+ SetPixelAlpha(q,GetPixelAlpha(p));
break;
}
default:
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
for (bit=0; bit < 8; bit++)
{
index=(IndexPacket) (((*p) & (0x80 >> bit)) != 0 ? 0x01 : 0x00);
- SetIndexPixelComponent(indexes+x+bit,index);
+ SetPixelIndex(indexes+x+bit,index);
q++;
}
p++;
for (bit=0; bit < (image->columns % 8); bit++)
{
index=(IndexPacket) (((*p) & (0x80 >> bit)) != 0 ? 0x01 : 0x00);
- SetIndexPixelComponent(indexes+x+bit,index);
+ SetPixelIndex(indexes+x+bit,index);
}
p++;
}
for (x=0; x < ((ssize_t) image->columns-1); x+=2)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
index=ConstrainColormapIndex(image,*p & 0x0f);
- SetIndexPixelComponent(indexes+x+1,index);
+ SetPixelIndex(indexes+x+1,index);
p++;
}
if ((image->columns % 2) != 0)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0xf);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
p++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
for (x = (ssize_t)image->columns; x != 0; --x)
{
index=ConstrainColormapIndex(image,*p);
- SetIndexPixelComponent(indexes,index);
+ SetPixelIndex(indexes,index);
indexes++;
p++;
q++;
opacity=((pixel & bmp_info.alpha_mask) << shift.opacity) >> 16;
if (quantum_bits.opacity <= 8)
opacity|=((opacity & 0xff00) >> 8);
- SetRedPixelComponent(q,ScaleShortToQuantum((unsigned short) red));
- SetGreenPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelRed(q,ScaleShortToQuantum((unsigned short) red));
+ SetPixelGreen(q,ScaleShortToQuantum((unsigned short)
green));
- SetBluePixelComponent(q,ScaleShortToQuantum((unsigned short) blue));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelBlue(q,ScaleShortToQuantum((unsigned short) blue));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelAlpha(q,ScaleShortToQuantum((unsigned short)
opacity));
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
opacity=((pixel & bmp_info.alpha_mask) << shift.opacity) >> 16;
if (quantum_bits.opacity == 8)
opacity|=(opacity >> 8);
- SetRedPixelComponent(q,ScaleShortToQuantum((unsigned short) red));
- SetGreenPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelRed(q,ScaleShortToQuantum((unsigned short) red));
+ SetPixelGreen(q,ScaleShortToQuantum((unsigned short)
green));
- SetBluePixelComponent(q,ScaleShortToQuantum((unsigned short) blue));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelBlue(q,ScaleShortToQuantum((unsigned short) blue));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelAlpha(q,ScaleShortToQuantum((unsigned short)
opacity));
q++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
byte<<=1;
- byte|=GetIndexPixelComponent(indexes+x) != 0 ? 0x01 : 0x00;
+ byte|=GetPixelIndex(indexes+x) != 0 ? 0x01 : 0x00;
bit++;
if (bit == 8)
{
for (x=0; x < (ssize_t) image->columns; x++)
{
byte<<=4;
- byte|=((size_t) GetIndexPixelComponent(indexes+x) & 0x0f);
+ byte|=((size_t) GetPixelIndex(indexes+x) & 0x0f);
nibble++;
if (nibble == 2)
{
indexes=GetVirtualIndexQueue(image);
q=pixels+(image->rows-y-1)*bytes_per_line;
for (x=0; x < (ssize_t) image->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
for ( ; x < (ssize_t) bytes_per_line; x++)
*q++=0x00;
if (image->previous == (Image *) NULL)
q=pixels+(image->rows-y-1)*bytes_per_line;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
p++;
}
for (x=3L*(ssize_t) image->columns; x < (ssize_t) bytes_per_line; x++)
q=pixels+(image->rows-y-1)*bytes_per_line;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(QuantumRange-GetOpacityPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(QuantumRange-GetPixelOpacity(p));
p++;
}
if (image->previous == (Image *) NULL)
{
#define do_cell(dx,dy,bit) do { \
if (image->storage_class == PseudoClass) \
- cell |= (GetIndexPixelComponent(indexes+x+dx+dy*image->columns) == polarity) << bit; \
+ cell |= (GetPixelIndex(indexes+x+dx+dy*image->columns) == polarity) << bit; \
else \
- cell |= (GetGreenPixelComponent(p+x+dx+dy*image->columns) == 0) << bit; \
+ cell |= (GetPixelGreen(p+x+dx+dy*image->columns) == 0) << bit; \
} while (0)
do_cell(0,0,0);
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(pBits->rgbRed));
- SetGreenPixelComponent(q,ScaleCharToQuantum(pBits->rgbGreen));
- SetBluePixelComponent(q,ScaleCharToQuantum(pBits->rgbBlue));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,ScaleCharToQuantum(pBits->rgbRed));
+ SetPixelGreen(q,ScaleCharToQuantum(pBits->rgbGreen));
+ SetPixelBlue(q,ScaleCharToQuantum(pBits->rgbBlue));
+ SetPixelOpacity(q,OpaqueOpacity);
pBits++;
q++;
}
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
- SetBlackPixelComponent(indexes+x,GetBlackPixelComponent(
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
+ SetPixelBlack(indexes+x,GetPixelBlack(
canvas_indexes+image->extract_info.x+x));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
{
case CyanQuantum:
{
- SetCyanPixelComponent(q,GetCyanPixelComponent(p));
+ SetPixelCyan(q,GetPixelCyan(p));
break;
}
case MagentaQuantum:
{
- SetMagentaPixelComponent(q,GetMagentaPixelComponent(p));
+ SetPixelMagenta(q,GetPixelMagenta(p));
break;
}
case YellowQuantum:
{
- SetYellowPixelComponent(q,GetYellowPixelComponent(p));
+ SetPixelYellow(q,GetPixelYellow(p));
break;
}
case BlackQuantum:
{
- SetIndexPixelComponent(indexes+x,GetIndexPixelComponent(
+ SetPixelIndex(indexes+x,GetPixelIndex(
canvas_indexes+image->extract_info.x+x));
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
break;
}
default:
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetIndexPixelComponent(indexes+x,GetIndexPixelComponent(
+ SetPixelIndex(indexes+x,GetPixelIndex(
canvas_indexes+image->extract_info.x+x));
p++;
q++;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetIndexPixelComponent(indexes+x,GetIndexPixelComponent(
+ SetPixelIndex(indexes+x,GetPixelIndex(
canvas_indexes+image->extract_info.x+x));
p++;
q++;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
for (bit=0; bit < 8; bit++)
{
index=(IndexPacket) ((((*p) & (0x80 >> bit)) != 0) ? 0x01 : 0x00);
- SetIndexPixelComponent(indexes+x+bit,index);
+ SetPixelIndex(indexes+x+bit,index);
}
p++;
}
for (bit=0; bit < (image->columns % 8); bit++)
{
index=(IndexPacket) ((((*p) & (0x80 >> bit)) != 0) ? 0x01 : 0x00);
- SetIndexPixelComponent(indexes+x+bit,index);
+ SetPixelIndex(indexes+x+bit,index);
}
p++;
}
for (x=0; x < ((ssize_t) image->columns-1); x+=2)
{
index=ConstrainColormapIndex(image,(*p >> 6) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
index=ConstrainColormapIndex(image,(*p >> 4) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
index=ConstrainColormapIndex(image,(*p >> 2) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
index=ConstrainColormapIndex(image,(*p) & 0x3);
- SetIndexPixelComponent(indexes+x+1,index);
+ SetPixelIndex(indexes+x+1,index);
p++;
}
if ((image->columns % 4) != 0)
{
index=ConstrainColormapIndex(image,(*p >> 6) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
if ((image->columns % 4) >= 1)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
if ((image->columns % 4) >= 2)
{
index=ConstrainColormapIndex(image,(*p >> 2) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
}
}
p++;
for (x=0; x < ((ssize_t) image->columns-1); x+=2)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0xf);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
index=ConstrainColormapIndex(image,(*p) & 0xf);
- SetIndexPixelComponent(indexes+x+1,index);
+ SetPixelIndex(indexes+x+1,index);
p++;
}
if ((image->columns % 2) != 0)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0xf);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
p++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
index=ConstrainColormapIndex(image,*p);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
p++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
q=GetAuthenticPixels(image,0,y,image->columns,1,exception);
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (intensity < GetRedPixelComponent(q))
- intensity=GetRedPixelComponent(q);
+ if (intensity < GetPixelRed(q))
+ intensity=GetPixelRed(q);
if (intensity >= scale_intensity)
return(255);
q++;
q=QueueAuthenticPixels(image,0,i,image->columns,1,exception);
for (j=0; j < (ssize_t)image->columns; j++)
{
- if (GetRedPixelComponent(q) == ScaleCharToQuantum(1))
+ if (GetPixelRed(q) == ScaleCharToQuantum(1))
{
- SetRedPixelComponent(q,QuantumRange);
- SetGreenPixelComponent(q,QuantumRange);
- SetBluePixelComponent(q,QuantumRange);
+ SetPixelRed(q,QuantumRange);
+ SetPixelGreen(q,QuantumRange);
+ SetPixelBlue(q,QuantumRange);
}
q++;
}
{
case 0:
{
- SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelRed(q,ScaleCharToQuantum((unsigned char)
ReadDCMByte(stream_info,image)));
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelGreen(q,ScaleCharToQuantum((unsigned char)
ReadDCMByte(stream_info,image)));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelBlue(q,ScaleCharToQuantum((unsigned char)
ReadDCMByte(stream_info,image)));
break;
}
case 3:
{
- SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelAlpha(q,ScaleCharToQuantum((unsigned char)
ReadDCMByte(stream_info,image)));
break;
}
}
index&=mask;
index=(int) ConstrainColormapIndex(image,(size_t) index);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
pixel.red=1UL*image->colormap[index].red;
pixel.green=1UL*image->colormap[index].green;
pixel.blue=1UL*image->colormap[index].blue;
pixel.blue=scale[pixel.blue];
}
}
- SetRedPixelComponent(q,pixel.red);
- SetGreenPixelComponent(q,pixel.green);
- SetBluePixelComponent(q,pixel.blue);
+ SetPixelRed(q,pixel.red);
+ SetPixelGreen(q,pixel.green);
+ SetPixelBlue(q,pixel.blue);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
}
index&=mask;
index=(int) ConstrainColormapIndex(image,(size_t) index);
- SetIndexPixelComponent(indexes+x,(((size_t)
- GetIndexPixelComponent(indexes+x)) | (((size_t) index) <<
+ SetPixelIndex(indexes+x,(((size_t)
+ GetPixelIndex(indexes+x)) | (((size_t) index) <<
8)));
pixel.red=1UL*image->colormap[index].red;
pixel.green=1UL*image->colormap[index].green;
pixel.blue=scale[pixel.blue];
}
}
- SetRedPixelComponent(q,(((size_t) GetRedPixelComponent(q)) |
+ SetPixelRed(q,(((size_t) GetPixelRed(q)) |
(((size_t) pixel.red) << 8)));
- SetGreenPixelComponent(q,(((size_t) GetGreenPixelComponent(q)) |
+ SetPixelGreen(q,(((size_t) GetPixelGreen(q)) |
(((size_t) pixel.green) << 8)));
- SetBluePixelComponent(q,(((size_t) GetBluePixelComponent(q)) |
+ SetPixelBlue(q,(((size_t) GetPixelBlue(q)) |
(((size_t) pixel.blue) << 8)));
q++;
}
if ((x + i) < (ssize_t) dds_info->width && (y + j) < (ssize_t) dds_info->height)
{
code = (unsigned char) ((bits >> ((j*4+i)*2)) & 0x3);
- SetRedPixelComponent(q,ScaleCharToQuantum(colors.r[code]));
- SetGreenPixelComponent(q,ScaleCharToQuantum(colors.g[code]));
- SetBluePixelComponent(q,ScaleCharToQuantum(colors.b[code]));
- SetOpacityPixelComponent(q,ScaleCharToQuantum(colors.a[code]));
+ SetPixelRed(q,ScaleCharToQuantum(colors.r[code]));
+ SetPixelGreen(q,ScaleCharToQuantum(colors.g[code]));
+ SetPixelBlue(q,ScaleCharToQuantum(colors.b[code]));
+ SetPixelOpacity(q,ScaleCharToQuantum(colors.a[code]));
if (colors.a[code] && image->matte == MagickFalse)
/* Correct matte */
image->matte = MagickTrue;
if ((x + i) < (ssize_t) dds_info->width && (y + j) < (ssize_t) dds_info->height)
{
code = (bits >> ((4*j+i)*2)) & 0x3;
- SetRedPixelComponent(q,ScaleCharToQuantum(colors.r[code]));
- SetGreenPixelComponent(q,ScaleCharToQuantum(colors.g[code]));
- SetBluePixelComponent(q,ScaleCharToQuantum(colors.b[code]));
+ SetPixelRed(q,ScaleCharToQuantum(colors.r[code]));
+ SetPixelGreen(q,ScaleCharToQuantum(colors.g[code]));
+ SetPixelBlue(q,ScaleCharToQuantum(colors.b[code]));
/*
Extract alpha value: multiply 0..15 by 17 to get range 0..255
*/
alpha = 17U * (unsigned char) ((a0 >> (4*(4*j+i))) & 0xf);
else
alpha = 17U * (unsigned char) ((a1 >> (4*(4*(j-2)+i))) & 0xf);
- SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelAlpha(q,ScaleCharToQuantum((unsigned char)
alpha));
q++;
}
if ((x + i) < (ssize_t) dds_info->width && (y + j) < (ssize_t) dds_info->height)
{
code = (bits >> ((4*j+i)*2)) & 0x3;
- SetRedPixelComponent(q,ScaleCharToQuantum(colors.r[code]));
- SetGreenPixelComponent(q,ScaleCharToQuantum(colors.g[code]));
- SetBluePixelComponent(q,ScaleCharToQuantum(colors.b[code]));
+ SetPixelRed(q,ScaleCharToQuantum(colors.r[code]));
+ SetPixelGreen(q,ScaleCharToQuantum(colors.g[code]));
+ SetPixelBlue(q,ScaleCharToQuantum(colors.b[code]));
/* Extract alpha value */
alpha_code = (size_t) (alpha_bits >> (3*(4*j+i))) & 0x7;
if (alpha_code == 0)
alpha = 255;
else
alpha = (((6-alpha_code) * a0 + (alpha_code-1) * a1) / 5);
- SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelAlpha(q,ScaleCharToQuantum((unsigned char)
alpha));
q++;
}
for (x = 0; x < (ssize_t) dds_info->width; x++)
{
- SetBluePixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelBlue(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
- SetGreenPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelGreen(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
- SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelRed(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
if (dds_info->pixelformat.rgb_bitcount == 32)
(void) ReadBlobByte(image);
for (x = 0; x < (ssize_t) dds_info->width; x++)
{
- SetBluePixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelBlue(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
- SetGreenPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelGreen(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
- SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelRed(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
- SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelAlpha(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
q++;
}
for (bit=0; bit < 8; bit++)
{
index=(IndexPacket) ((*p) & (0x80 >> bit) ? 0x01 : 0x00);
- SetIndexPixelComponent(indexes+x+bit,index);
+ SetPixelIndex(indexes+x+bit,index);
}
p++;
}
for (bit=0; bit < (ssize_t) (image->columns % 8); bit++)
{
index=(IndexPacket) ((*p) & (0x80 >> bit) ? 0x01 : 0x00);
- SetIndexPixelComponent(indexes+x+bit,index);
+ SetPixelIndex(indexes+x+bit,index);
}
p++;
}
for (x=0; x < ((ssize_t) image->columns-1); x+=2)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0xf);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
index=ConstrainColormapIndex(image,*p & 0xf);
- SetIndexPixelComponent(indexes+x+1,index);
+ SetPixelIndex(indexes+x+1,index);
p++;
}
if ((image->columns % 2) != 0)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0xf);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
p++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
index=ConstrainColormapIndex(image,*p);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
p++;
q++;
}
word|=(*p++ << 8);
if (dib_info.red_mask == 0)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(ScaleColor5to8(
+ SetPixelRed(q,ScaleCharToQuantum(ScaleColor5to8(
(unsigned char) ((word >> 10) & 0x1f))));
- SetGreenPixelComponent(q,ScaleCharToQuantum(ScaleColor5to8(
+ SetPixelGreen(q,ScaleCharToQuantum(ScaleColor5to8(
(unsigned char) ((word >> 5) & 0x1f))));
- SetBluePixelComponent(q,ScaleCharToQuantum(ScaleColor5to8(
+ SetPixelBlue(q,ScaleCharToQuantum(ScaleColor5to8(
(unsigned char) (word & 0x1f))));
}
else
{
- SetRedPixelComponent(q,ScaleCharToQuantum(ScaleColor5to8(
+ SetPixelRed(q,ScaleCharToQuantum(ScaleColor5to8(
(unsigned char) ((word >> 11) & 0x1f))));
- SetGreenPixelComponent(q,ScaleCharToQuantum(ScaleColor6to8(
+ SetPixelGreen(q,ScaleCharToQuantum(ScaleColor6to8(
(unsigned char) ((word >> 5) & 0x3f))));
- SetBluePixelComponent(q,ScaleCharToQuantum(ScaleColor5to8(
+ SetPixelBlue(q,ScaleCharToQuantum(ScaleColor5to8(
(unsigned char) (word & 0x1f))));
}
q++;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelOpacity(q,ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
byte<<=1;
- byte|=GetIndexPixelComponent(indexes+x) != 0 ? 0x01 : 0x00;
+ byte|=GetPixelIndex(indexes+x) != 0 ? 0x01 : 0x00;
bit++;
if (bit == 8)
{
indexes=GetVirtualIndexQueue(image);
q=pixels+(image->rows-y-1)*bytes_per_line;
for (x=0; x < (ssize_t) image->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
for ( ; x < (ssize_t) bytes_per_line; x++)
*q++=0x00;
status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
for (x=0; x < (ssize_t) image->columns; x++)
{
word=(unsigned short) ((ScaleColor8to5((unsigned char)
- ScaleQuantumToChar(GetRedPixelComponent(p))) << 11) |
+ ScaleQuantumToChar(GetPixelRed(p))) << 11) |
(ScaleColor8to6((unsigned char) ScaleQuantumToChar(
- GetGreenPixelComponent(p))) << 5) | (ScaleColor8to5((unsigned char)
- ScaleQuantumToChar((unsigned char) GetBluePixelComponent(p)) <<
+ GetPixelGreen(p))) << 5) | (ScaleColor8to5((unsigned char)
+ ScaleQuantumToChar((unsigned char) GetPixelBlue(p)) <<
0)));
*q++=(unsigned char)(word & 0xff);
*q++=(unsigned char)(word >> 8);
q=pixels+(image->rows-y-1)*bytes_per_line;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
if (image->matte != MagickFalse)
- *q++=ScaleQuantumToChar(GetOpacityPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelOpacity(p));
p++;
}
if (dib_info.bits_per_pixel == 24)
if (bit == 0) byte= (size_t) q[(y * stride) + (x / 8)];
if (indexes != (IndexPacket *) NULL)
- SetIndexPixelComponent(indexes+x,(IndexPacket) (((byte & 0x01) != 0) ? 0x00 : 0x01));
+ SetPixelIndex(indexes+x,(IndexPacket) (((byte & 0x01) != 0) ? 0x00 : 0x01));
bit++;
if (bit == 8)
bit=0;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(r,ScaleCharToQuantum(*s++));
- SetGreenPixelComponent(r,ScaleCharToQuantum(*s++));
- SetBluePixelComponent(r,ScaleCharToQuantum(*s++));
+ SetPixelRed(r,ScaleCharToQuantum(*s++));
+ SetPixelGreen(r,ScaleCharToQuantum(*s++));
+ SetPixelBlue(r,ScaleCharToQuantum(*s++));
r++;
}
{
pixel=XGetPixel(dps_image,x,y);
index=(pixel >> red_shift) & red_mask;
- SetRedPixelComponent(q,ScaleShortToQuantum(colors[index].red));
+ SetPixelRed(q,ScaleShortToQuantum(colors[index].red));
index=(pixel >> green_shift) & green_mask;
- SetGreenPixelComponent(q,ScaleShortToQuantum(colors[index].green));
+ SetPixelGreen(q,ScaleShortToQuantum(colors[index].green));
index=(pixel >> blue_shift) & blue_mask;
- SetBluePixelComponent(q,ScaleShortToQuantum(colors[index].blue));
+ SetPixelBlue(q,ScaleShortToQuantum(colors[index].blue));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
pixel=XGetPixel(dps_image,x,y);
color=(pixel >> red_shift) & red_mask;
color=(color*65535L)/red_mask;
- SetRedPixelComponent(q,ScaleShortToQuantum((unsigned short) color));
+ SetPixelRed(q,ScaleShortToQuantum((unsigned short) color));
color=(pixel >> green_shift) & green_mask;
color=(color*65535L)/green_mask;
- SetGreenPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelGreen(q,ScaleShortToQuantum((unsigned short)
color));
color=(pixel >> blue_shift) & blue_mask;
color=(color*65535L)/blue_mask;
- SetBluePixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelBlue(q,ScaleShortToQuantum((unsigned short)
color));
q++;
}
break;
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,(unsigned short)
+ SetPixelIndex(indexes+x,(unsigned short)
XGetPixel(dps_image,x,y));
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
if (XGetPixel(matte_image,x,y) == 0)
- SetOpacityPixelComponent(q,TransparentOpacity);
+ SetPixelOpacity(q,TransparentOpacity);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(pBits->rgbRed));
- SetGreenPixelComponent(q,ScaleCharToQuantum(pBits->rgbGreen));
- SetBluePixelComponent(q,ScaleCharToQuantum(pBits->rgbBlue));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,ScaleCharToQuantum(pBits->rgbRed));
+ SetPixelGreen(q,ScaleCharToQuantum(pBits->rgbGreen));
+ SetPixelBlue(q,ScaleCharToQuantum(pBits->rgbBlue));
+ SetPixelOpacity(q,OpaqueOpacity);
pBits++;
q++;
}
ImfInputReadPixels(file,min_y+y,min_y+y);
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType) QuantumRange*
+ SetPixelRed(q,ClampToQuantum((MagickRealType) QuantumRange*
ImfHalfToFloat(scanline[x].r)));
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType) QuantumRange*
+ SetPixelGreen(q,ClampToQuantum((MagickRealType) QuantumRange*
ImfHalfToFloat(scanline[x].g)));
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType) QuantumRange*
+ SetPixelBlue(q,ClampToQuantum((MagickRealType) QuantumRange*
ImfHalfToFloat(scanline[x].b)));
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType) QuantumRange*
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType) QuantumRange*
ImfHalfToFloat(scanline[x].a)));
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- ImfFloatToHalf(QuantumScale*GetRedPixelComponent(p),&half_quantum);
+ ImfFloatToHalf(QuantumScale*GetPixelRed(p),&half_quantum);
scanline[x].r=half_quantum;
- ImfFloatToHalf(QuantumScale*GetGreenPixelComponent(p),&half_quantum);
+ ImfFloatToHalf(QuantumScale*GetPixelGreen(p),&half_quantum);
scanline[x].g=half_quantum;
- ImfFloatToHalf(QuantumScale*GetBluePixelComponent(p),&half_quantum);
+ ImfFloatToHalf(QuantumScale*GetPixelBlue(p),&half_quantum);
scanline[x].b=half_quantum;
if (image->matte == MagickFalse)
ImfFloatToHalf(1.0,&half_quantum);
else
- ImfFloatToHalf(1.0-QuantumScale*GetOpacityPixelComponent(p),
+ ImfFloatToHalf(1.0-QuantumScale*GetPixelOpacity(p),
&half_quantum);
scanline[x].a=half_quantum;
p++;
for (x=0; x < (ssize_t) image->columns; x++)
{
pixel=GetFITSPixel(image,fits_info.bits_per_pixel);
- SetRedPixelComponent(q,ClampToQuantum(scale*(fits_info.scale*(pixel-
+ SetPixelRed(q,ClampToQuantum(scale*(fits_info.scale*(pixel-
fits_info.min_data)+fits_info.zero)));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
{
if (fpx_info.numberOfComponents > 2)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*r));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*g));
- SetBluePixelComponent(q,ScaleCharToQuantum(*b));
+ SetPixelRed(q,ScaleCharToQuantum(*r));
+ SetPixelGreen(q,ScaleCharToQuantum(*g));
+ SetPixelBlue(q,ScaleCharToQuantum(*b));
}
else
{
index=ScaleCharToQuantum(*r);
- SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,index);
- SetGreenPixelComponent(q,index);
- SetBluePixelComponent(q,index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRed(q,index);
+ SetPixelGreen(q,index);
+ SetPixelBlue(q,index);
}
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*a));
+ SetPixelAlpha(q,ScaleCharToQuantum(*a));
q++;
r+=red_component->columnStride;
g+=green_component->columnStride;
if (c < 0)
break;
index=ConstrainColormapIndex(image,(size_t) c);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
- SetOpacityPixelComponent(q,(ssize_t) index == opacity ?
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
+ SetPixelOpacity(q,(ssize_t) index == opacity ?
TransparentOpacity : OpaqueOpacity);
x++;
q++;
/*
Probe hash table.
*/
- index=(IndexPacket) ((size_t) GetIndexPixelComponent(indexes+x) & 0xff);
+ index=(IndexPacket) ((size_t) GetPixelIndex(indexes+x) & 0xff);
p++;
k=(ssize_t) (((size_t) index << (MaxGIFBits-8))+waiting_code);
if (k >= MaxHashTable)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
{
for (red=0; red < (ssize_t) cube_size; red++)
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumRange*red/
+ SetPixelRed(q,ClampToQuantum(QuantumRange*red/
(cube_size-1.0)));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumRange*green/
+ SetPixelGreen(q,ClampToQuantum(QuantumRange*green/
(cube_size-1.0)));
- SetBluePixelComponent(q,ClampToQuantum(QuantumRange*blue/
+ SetPixelBlue(q,ClampToQuantum(QuantumRange*blue/
(cube_size-1.0)));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
}
pixel[2]=pixels[i++];
pixel[3]=pixels[i++];
}
- SetRedPixelComponent(q,0);
- SetGreenPixelComponent(q,0);
- SetBluePixelComponent(q,0);
+ SetPixelRed(q,0);
+ SetPixelGreen(q,0);
+ SetPixelBlue(q,0);
if (pixel[3] != 0)
{
gamma=pow(2.0,pixel[3]-(128.0+8.0));
- SetRedPixelComponent(q,ClampToQuantum(QuantumRange*gamma*pixel[0]));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumRange*gamma*pixel[1]));
- SetBluePixelComponent(q,ClampToQuantum(QuantumRange*gamma*pixel[2]));
+ SetPixelRed(q,ClampToQuantum(QuantumRange*gamma*pixel[0]));
+ SetPixelGreen(q,ClampToQuantum(QuantumRange*gamma*pixel[1]));
+ SetPixelBlue(q,ClampToQuantum(QuantumRange*gamma*pixel[2]));
}
q++;
}
pixel[1]=0;
pixel[2]=0;
pixel[3]=0;
- gamma=QuantumScale*GetRedPixelComponent(p);
- if ((QuantumScale*GetGreenPixelComponent(p)) > gamma)
- gamma=QuantumScale*GetGreenPixelComponent(p);
- if ((QuantumScale*GetBluePixelComponent(p)) > gamma)
- gamma=QuantumScale*GetBluePixelComponent(p);
+ gamma=QuantumScale*GetPixelRed(p);
+ if ((QuantumScale*GetPixelGreen(p)) > gamma)
+ gamma=QuantumScale*GetPixelGreen(p);
+ if ((QuantumScale*GetPixelBlue(p)) > gamma)
+ gamma=QuantumScale*GetPixelBlue(p);
if (gamma > MagickEpsilon)
{
int
exponent;
gamma=frexp(gamma,&exponent)*256.0/gamma;
- pixel[0]=(unsigned char) (gamma*QuantumScale*GetRedPixelComponent(p));
+ pixel[0]=(unsigned char) (gamma*QuantumScale*GetPixelRed(p));
pixel[1]=(unsigned char) (gamma*QuantumScale*
- GetGreenPixelComponent(p));
+ GetPixelGreen(p));
pixel[2]=(unsigned char) (gamma*QuantumScale*
- GetBluePixelComponent(p));
+ GetPixelBlue(p));
pixel[3]=(unsigned char) (exponent+128);
}
if ((image->columns >= 8) && (image->columns <= 0x7ffff))
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- histogram[ScaleQuantumToChar(GetRedPixelComponent(p))].red++;
+ histogram[ScaleQuantumToChar(GetPixelRed(p))].red++;
if ((channel & GreenChannel) != 0)
- histogram[ScaleQuantumToChar(GetGreenPixelComponent(p))].green++;
+ histogram[ScaleQuantumToChar(GetPixelGreen(p))].green++;
if ((channel & BlueChannel) != 0)
- histogram[ScaleQuantumToChar(GetBluePixelComponent(p))].blue++;
+ histogram[ScaleQuantumToChar(GetPixelBlue(p))].blue++;
p++;
}
}
r=q+y;
for ( ; y < (ssize_t) histogram_image->rows; y++)
{
- SetRedPixelComponent(r,QuantumRange);
+ SetPixelRed(r,QuantumRange);
r++;
}
}
r=q+y;
for ( ; y < (ssize_t) histogram_image->rows; y++)
{
- SetGreenPixelComponent(r,QuantumRange);
+ SetPixelGreen(r,QuantumRange);
r++;
}
}
r=q+y;
for ( ; y < (ssize_t) histogram_image->rows; y++)
{
- SetBluePixelComponent(r,QuantumRange);
+ SetPixelBlue(r,QuantumRange);
r++;
}
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,4*ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,4*ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,4*ScaleCharToQuantum(*p++));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,4*ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,4*ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,4*ScaleCharToQuantum(*p++));
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
q=pixels;
for (x=0; x < (ssize_t) hrz_image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p))/4;
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p))/4;
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p))/4;
+ *q++=ScaleQuantumToChar(GetPixelRed(p))/4;
+ *q++=ScaleQuantumToChar(GetPixelGreen(p))/4;
+ *q++=ScaleQuantumToChar(GetPixelBlue(p))/4;
p++;
}
count=WriteBlob(image,(size_t) (q-pixels),pixels);
{
byte=(size_t) ReadBlobByte(image);
for (bit=0; bit < 8; bit++)
- SetIndexPixelComponent(indexes+x+bit,
+ SetPixelIndex(indexes+x+bit,
((byte & (0x80 >> bit)) != 0 ? 0x01 : 0x00));
}
if ((image->columns % 8) != 0)
{
byte=(size_t) ReadBlobByte(image);
for (bit=0; bit < (image->columns % 8); bit++)
- SetIndexPixelComponent(indexes+x+bit,
+ SetPixelIndex(indexes+x+bit,
((byte & (0x80 >> bit)) != 0 ? 0x01 : 0x00));
}
for (x=0; x < (ssize_t) scanline_pad; x++)
for (x=0; x < ((ssize_t) image->columns-1); x+=2)
{
byte=(size_t) ReadBlobByte(image);
- SetIndexPixelComponent(indexes+x,((byte >> 4) & 0xf));
- SetIndexPixelComponent(indexes+x+1,((byte) & 0xf));
+ SetPixelIndex(indexes+x,((byte >> 4) & 0xf));
+ SetPixelIndex(indexes+x+1,((byte) & 0xf));
}
if ((image->columns % 2) != 0)
{
byte=(size_t) ReadBlobByte(image);
- SetIndexPixelComponent(indexes+x,((byte >> 4) & 0xf));
+ SetPixelIndex(indexes+x,((byte >> 4) & 0xf));
}
for (x=0; x < (ssize_t) scanline_pad; x++)
(void) ReadBlobByte(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
byte=(size_t) ReadBlobByte(image);
- SetIndexPixelComponent(indexes+x,byte);
+ SetPixelIndex(indexes+x,byte);
}
for (x=0; x < (ssize_t) scanline_pad; x++)
(void) ReadBlobByte(image);
{
byte=(size_t) ReadBlobByte(image);
byte|=(size_t) (ReadBlobByte(image) << 8);
- SetIndexPixelComponent(indexes+x,byte);
+ SetPixelIndex(indexes+x,byte);
}
for (x=0; x < (ssize_t) scanline_pad; x++)
(void) ReadBlobByte(image);
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelBlue(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
- SetGreenPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelGreen(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
- SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelRed(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
if (icon_info.bits_per_pixel == 32)
- SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelAlpha(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
q++;
}
{
byte=(size_t) ReadBlobByte(image);
for (bit=0; bit < 8; bit++)
- SetOpacityPixelComponent(q+x+bit,(((byte & (0x80 >> bit)) !=
+ SetPixelOpacity(q+x+bit,(((byte & (0x80 >> bit)) !=
0) ? TransparentOpacity : OpaqueOpacity));
}
if ((image->columns % 8) != 0)
{
byte=(size_t) ReadBlobByte(image);
for (bit=0; bit < (image->columns % 8); bit++)
- SetOpacityPixelComponent(q+x+bit,(((byte & (0x80 >> bit)) !=
+ SetPixelOpacity(q+x+bit,(((byte & (0x80 >> bit)) !=
0) ? TransparentOpacity : OpaqueOpacity));
}
if ((image->columns % 32) != 0)
for (x=0; x < (ssize_t) next->columns; x++)
{
byte<<=1;
- byte|=GetIndexPixelComponent(indexes+x) != 0 ? 0x01 : 0x00;
+ byte|=GetPixelIndex(indexes+x) != 0 ? 0x01 : 0x00;
bit++;
if (bit == 8)
{
for (x=0; x < (ssize_t) next->columns; x++)
{
byte<<=4;
- byte|=((size_t) GetIndexPixelComponent(indexes+x) & 0x0f);
+ byte|=((size_t) GetPixelIndex(indexes+x) & 0x0f);
nibble++;
if (nibble == 2)
{
indexes=GetVirtualIndexQueue(next);
q=pixels+(next->rows-y-1)*bytes_per_line;
for (x=0; x < (ssize_t) next->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
if (next->previous == (Image *) NULL)
{
status=SetImageProgress(next,SaveImageTag,y,next->rows);
q=pixels+(next->rows-y-1)*bytes_per_line;
for (x=0; x < (ssize_t) next->columns; x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
if (next->matte == MagickFalse)
*q++=ScaleQuantumToChar(QuantumRange);
else
- *q++=ScaleQuantumToChar(GetAlphaPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelAlpha(p));
p++;
}
if (icon_info.bits_per_pixel == 24)
{
byte<<=1;
if ((next->matte == MagickTrue) &&
- (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity))
+ (GetPixelOpacity(p) == (Quantum) TransparentOpacity))
byte|=0x01;
bit++;
if (bit == 8)
byte<<=1;
if (bit == 8)
bit=0;
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
pixel=(QuantumAny) jas_matrix_getv(pixels[0],x/x_step[0]);
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny) pixel,
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny) pixel,
range[0]));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
pixel=(QuantumAny) jas_matrix_getv(pixels[0],x/x_step[0]);
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny) pixel,
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny) pixel,
range[0]));
pixel=(QuantumAny) jas_matrix_getv(pixels[1],x/x_step[1]);
- SetGreenPixelComponent(q,ScaleAnyToQuantum((QuantumAny) pixel,
+ SetPixelGreen(q,ScaleAnyToQuantum((QuantumAny) pixel,
range[1]));
pixel=(QuantumAny) jas_matrix_getv(pixels[2],x/x_step[2]);
- SetBluePixelComponent(q,ScaleAnyToQuantum((QuantumAny) pixel,
+ SetPixelBlue(q,ScaleAnyToQuantum((QuantumAny) pixel,
range[2]));
q++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
pixel=(QuantumAny) jas_matrix_getv(pixels[0],x/x_step[0]);
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny) pixel,
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny) pixel,
range[0]));
pixel=(QuantumAny) jas_matrix_getv(pixels[1],x/x_step[1]);
- SetGreenPixelComponent(q,ScaleAnyToQuantum((QuantumAny) pixel,
+ SetPixelGreen(q,ScaleAnyToQuantum((QuantumAny) pixel,
range[1]));
pixel=(QuantumAny) jas_matrix_getv(pixels[2],x/x_step[2]);
- SetBluePixelComponent(q,ScaleAnyToQuantum((QuantumAny) pixel,
+ SetPixelBlue(q,ScaleAnyToQuantum((QuantumAny) pixel,
range[2]));
pixel=(QuantumAny) jas_matrix_getv(pixels[3],x/x_step[3]);
- SetAlphaPixelComponent(q,ScaleAnyToQuantum((QuantumAny) pixel,
+ SetPixelAlpha(q,ScaleAnyToQuantum((QuantumAny) pixel,
range[3]));
q++;
}
else
{
jas_matrix_setv(pixels[0],x,(jas_seqent_t)
- ScaleQuantumToAny(GetRedPixelComponent(p),range));
+ ScaleQuantumToAny(GetPixelRed(p),range));
jas_matrix_setv(pixels[1],x,(jas_seqent_t)
- ScaleQuantumToAny(GetGreenPixelComponent(p),range));
+ ScaleQuantumToAny(GetPixelGreen(p),range));
jas_matrix_setv(pixels[2],x,(jas_seqent_t)
- ScaleQuantumToAny(GetBluePixelComponent(p),range));
+ ScaleQuantumToAny(GetPixelBlue(p),range));
if (number_components > 3)
jas_matrix_setv(pixels[3],x,(jas_seqent_t)
- ScaleQuantumToAny((Quantum) (GetAlphaPixelComponent(p)),range));
+ ScaleQuantumToAny((Quantum) (GetPixelAlpha(p)),range));
}
p++;
}
else
pixel=(size_t) ((GETJSAMPLE(*p) ^ 0x80) << 4);
index=ConstrainColormapIndex(image,pixel);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
p++;
q++;
}
if (image->colorspace != CMYKColorspace)
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleShortToQuantum((unsigned char)
+ SetPixelRed(q,ScaleShortToQuantum((unsigned char)
(GETJSAMPLE(*p++) << 4)));
- SetGreenPixelComponent(q,ScaleShortToQuantum((unsigned char)
+ SetPixelGreen(q,ScaleShortToQuantum((unsigned char)
(GETJSAMPLE(*p++) << 4)));
- SetBluePixelComponent(q,ScaleShortToQuantum((unsigned char)
+ SetPixelBlue(q,ScaleShortToQuantum((unsigned char)
(GETJSAMPLE(*p++) << 4)));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
else
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetCyanPixelComponent(q,QuantumRange-ScaleShortToQuantum(
+ SetPixelCyan(q,QuantumRange-ScaleShortToQuantum(
(unsigned char) (GETJSAMPLE(*p++) << 4)));
- SetMagentaPixelComponent(q,QuantumRange-ScaleShortToQuantum(
+ SetPixelMagenta(q,QuantumRange-ScaleShortToQuantum(
(unsigned char) (GETJSAMPLE(*p++) << 4)));
- SetYellowPixelComponent(q,QuantumRange-ScaleShortToQuantum(
+ SetPixelYellow(q,QuantumRange-ScaleShortToQuantum(
(unsigned char) (GETJSAMPLE(*p++) << 4)));
- SetBlackPixelComponent(indexes+x,QuantumRange-ScaleShortToQuantum(
+ SetPixelBlack(indexes+x,QuantumRange-ScaleShortToQuantum(
(unsigned char) (GETJSAMPLE(*p++) << 4)));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
index=ConstrainColormapIndex(image,(size_t) GETJSAMPLE(*p));
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
p++;
q++;
}
if (image->colorspace != CMYKColorspace)
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelRed(q,ScaleCharToQuantum((unsigned char)
GETJSAMPLE(*p++)));
- SetGreenPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelGreen(q,ScaleCharToQuantum((unsigned char)
GETJSAMPLE(*p++)));
- SetBluePixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelBlue(q,ScaleCharToQuantum((unsigned char)
GETJSAMPLE(*p++)));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
else
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetCyanPixelComponent(q,QuantumRange-ScaleCharToQuantum(
+ SetPixelCyan(q,QuantumRange-ScaleCharToQuantum(
(unsigned char) GETJSAMPLE(*p++)));
- SetMagentaPixelComponent(q,QuantumRange-ScaleCharToQuantum(
+ SetPixelMagenta(q,QuantumRange-ScaleCharToQuantum(
(unsigned char) GETJSAMPLE(*p++)));
- SetYellowPixelComponent(q,QuantumRange-ScaleCharToQuantum(
+ SetPixelYellow(q,QuantumRange-ScaleCharToQuantum(
(unsigned char) GETJSAMPLE(*p++)));
- SetBlackPixelComponent(indexes+x,QuantumRange-ScaleCharToQuantum(
+ SetPixelBlack(indexes+x,QuantumRange-ScaleCharToQuantum(
(unsigned char) GETJSAMPLE(*p++)));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
q=jpeg_pixels;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=(JSAMPLE) ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=(JSAMPLE) ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=(JSAMPLE) ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=(JSAMPLE) ScaleQuantumToChar(GetPixelRed(p));
+ *q++=(JSAMPLE) ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=(JSAMPLE) ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
(void) jpeg_write_scanlines(&jpeg_info,scanline,1);
Convert DirectClass packets to contiguous CMYK scanlines.
*/
*q++=(JSAMPLE) (ScaleQuantumToChar((Quantum) (QuantumRange-
- GetRedPixelComponent(p))));
+ GetPixelRed(p))));
*q++=(JSAMPLE) (ScaleQuantumToChar((Quantum) (QuantumRange-
- GetGreenPixelComponent(p))));
+ GetPixelGreen(p))));
*q++=(JSAMPLE) (ScaleQuantumToChar((Quantum) (QuantumRange-
- GetBluePixelComponent(p))));
+ GetPixelBlue(p))));
*q++=(JSAMPLE) (ScaleQuantumToChar((Quantum) (QuantumRange-
- GetIndexPixelComponent(indexes+x))));
+ GetPixelIndex(indexes+x))));
p++;
}
(void) jpeg_write_scanlines(&jpeg_info,scanline,1);
q=jpeg_pixels;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=(JSAMPLE) (ScaleQuantumToShort(GetRedPixelComponent(p)) >>
+ *q++=(JSAMPLE) (ScaleQuantumToShort(GetPixelRed(p)) >>
4);
- *q++=(JSAMPLE) (ScaleQuantumToShort(GetGreenPixelComponent(p)) >>
+ *q++=(JSAMPLE) (ScaleQuantumToShort(GetPixelGreen(p)) >>
4);
- *q++=(JSAMPLE) (ScaleQuantumToShort(GetBluePixelComponent(p)) >>
+ *q++=(JSAMPLE) (ScaleQuantumToShort(GetPixelBlue(p)) >>
4);
p++;
}
Convert DirectClass packets to contiguous CMYK scanlines.
*/
*q++=(JSAMPLE) (4095-(ScaleQuantumToShort(
- GetRedPixelComponent(p)) >> 4));
+ GetPixelRed(p)) >> 4));
*q++=(JSAMPLE) (4095-(ScaleQuantumToShort(
- GetGreenPixelComponent(p)) >> 4));
+ GetPixelGreen(p)) >> 4));
*q++=(JSAMPLE) (4095-(ScaleQuantumToShort(
- GetBluePixelComponent(p)) >> 4));
+ GetPixelBlue(p)) >> 4));
*q++=(JSAMPLE) (4095-(ScaleQuantumToShort(
- GetIndexPixelComponent(indexes+x)) >> 4));
+ GetPixelIndex(indexes+x)) >> 4));
p++;
}
(void) jpeg_write_scanlines(&jpeg_info,scanline,1);
{
if (bit == 0)
byte=(*p++);
- SetIndexPixelComponent(indexes+x,((byte & 0x80) != 0 ?
+ SetPixelIndex(indexes+x,((byte & 0x80) != 0 ?
0x01 : 0x00));
bit++;
byte<<=1;
{
if (bit == 0)
byte=(*p++);
- SetIndexPixelComponent(indexes+x,((byte & 0x80) != 0 ?
+ SetPixelIndex(indexes+x,((byte & 0x80) != 0 ?
0x01 : 0x00));
bit++;
byte<<=1;
index=ConstrainColormapIndex(image,((size_t) index << 8)+(*p));
p++;
}
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
if (image->colors > 256)
- *q++=(unsigned char) ((size_t) GetIndexPixelComponent(indexes+x) >> 8);
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) ((size_t) GetPixelIndex(indexes+x) >> 8);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
}
(void) WriteBlob(image,(size_t) (q-pixels),pixels);
}
{
if (*p > 0)
{
- f = (*p / MaxVal) * (QuantumRange - GetRedPixelComponent(q));
- if (f + GetRedPixelComponent(q) > QuantumRange)
- SetRedPixelComponent(q,QuantumRange);
+ f = (*p / MaxVal) * (QuantumRange - GetPixelRed(q));
+ if (f + GetPixelRed(q) > QuantumRange)
+ SetPixelRed(q,QuantumRange);
else
- SetRedPixelComponent(q,GetRedPixelComponent(q)+(int) f);
- if ((int) f / 2.0 > GetGreenPixelComponent(q))
+ SetPixelRed(q,GetPixelRed(q)+(int) f);
+ if ((int) f / 2.0 > GetPixelGreen(q))
{
- SetGreenPixelComponent(q,0);
- SetBluePixelComponent(q,0);
+ SetPixelGreen(q,0);
+ SetPixelBlue(q,0);
}
else
{
- SetBluePixelComponent(q,GetBluePixelComponent(q)-(int) (f/2.0));
- SetGreenPixelComponent(q,GetBluePixelComponent(q));
+ SetPixelBlue(q,GetPixelBlue(q)-(int) (f/2.0));
+ SetPixelGreen(q,GetPixelBlue(q));
}
}
if (*p < 0)
{
- f = (*p / MaxVal) * (QuantumRange - GetBluePixelComponent(q));
- if (f + GetBluePixelComponent(q) > QuantumRange)
- SetBluePixelComponent(q,QuantumRange);
+ f = (*p / MaxVal) * (QuantumRange - GetPixelBlue(q));
+ if (f + GetPixelBlue(q) > QuantumRange)
+ SetPixelBlue(q,QuantumRange);
else
- SetBluePixelComponent(q,GetBluePixelComponent(q)+(int) f);
+ SetPixelBlue(q,GetPixelBlue(q)+(int) f);
if ((int) f / 2.0 > q->green)
{
- SetRedPixelComponent(q,0);
- SetGreenPixelComponent(q,0);
+ SetPixelRed(q,0);
+ SetPixelGreen(q,0);
}
else
{
- SetRedPixelComponent(q,GetRedPixelComponent(q)-(int) (f/2.0));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,GetPixelRed(q)-(int) (f/2.0));
+ SetPixelGreen(q,GetPixelRed(q));
}
}
p++;
{
if (*p > 0)
{
- f = (*p / MaxVal) * (QuantumRange - GetRedPixelComponent(q));
- if (f + GetRedPixelComponent(q) > QuantumRange)
- SetRedPixelComponent(q,QuantumRange);
+ f = (*p / MaxVal) * (QuantumRange - GetPixelRed(q));
+ if (f + GetPixelRed(q) > QuantumRange)
+ SetPixelRed(q,QuantumRange);
else
- SetRedPixelComponent(q,GetRedPixelComponent(q)+(int) f);
- if ((int) f / 2.0 > GetGreenPixelComponent(q))
+ SetPixelRed(q,GetPixelRed(q)+(int) f);
+ if ((int) f / 2.0 > GetPixelGreen(q))
{
- SetGreenPixelComponent(q,0);
- SetBluePixelComponent(q,0);
+ SetPixelGreen(q,0);
+ SetPixelBlue(q,0);
}
else
{
- SetBluePixelComponent(q,GetBluePixelComponent(q)-(int) (f/2.0));
- SetGreenPixelComponent(q,GetBluePixelComponent(q));
+ SetPixelBlue(q,GetPixelBlue(q)-(int) (f/2.0));
+ SetPixelGreen(q,GetPixelBlue(q));
}
}
if (*p < 0)
{
- f = (*p / MaxVal) * (QuantumRange - GetBluePixelComponent(q));
- if (f + GetBluePixelComponent(q) > QuantumRange)
- SetBluePixelComponent(q,QuantumRange);
+ f = (*p / MaxVal) * (QuantumRange - GetPixelBlue(q));
+ if (f + GetPixelBlue(q) > QuantumRange)
+ SetPixelBlue(q,QuantumRange);
else
- SetBluePixelComponent(q,GetBluePixelComponent(q)+(int) f);
+ SetPixelBlue(q,GetPixelBlue(q)+(int) f);
if ((int) f / 2.0 > q->green)
{
- SetGreenPixelComponent(q,0);
- SetRedPixelComponent(q,0);
+ SetPixelGreen(q,0);
+ SetPixelRed(q,0);
}
else
{
- SetRedPixelComponent(q,GetRedPixelComponent(q)-(int) (f/2.0));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,GetPixelRed(q)-(int) (f/2.0));
+ SetPixelGreen(q,GetPixelRed(q));
}
}
p++;
/* Please note that negative values will overflow
Q=8; QuantumRange=255: <0;127> + 127+1 = <128; 255>
<-1;-128> + 127+1 = <0; 127> */
- SetRedPixelComponent(q,GetRedPixelComponent(q)+QuantumRange/2+1);
- SetGreenPixelComponent(q,GetGreenPixelComponent(q)+QuantumRange/2+1);
- SetBluePixelComponent(q,GetBluePixelComponent(q)+QuantumRange/2+1);
+ SetPixelRed(q,GetPixelRed(q)+QuantumRange/2+1);
+ SetPixelGreen(q,GetPixelGreen(q)+QuantumRange/2+1);
+ SetPixelBlue(q,GetPixelBlue(q)+QuantumRange/2+1);
q++;
}
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetOpacityPixelComponent(p));
- SetGreenPixelComponent(q,GetOpacityPixelComponent(p));
- SetBluePixelComponent(q,GetOpacityPixelComponent(p));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,GetPixelOpacity(p));
+ SetPixelGreen(q,GetPixelOpacity(p));
+ SetPixelBlue(q,GetPixelOpacity(p));
+ SetPixelOpacity(q,OpaqueOpacity);
p++;
q++;
}
quantum;
p=PushCharPixel(p,&quantum);
- SetRedPixelComponent(pixel,ScaleCharToQuantum(quantum));
+ SetPixelRed(pixel,ScaleCharToQuantum(quantum));
p=PushCharPixel(p,&quantum);
- SetGreenPixelComponent(pixel,ScaleCharToQuantum(quantum));
+ SetPixelGreen(pixel,ScaleCharToQuantum(quantum));
p=PushCharPixel(p,&quantum);
- SetBluePixelComponent(pixel,ScaleCharToQuantum(quantum));
+ SetPixelBlue(pixel,ScaleCharToQuantum(quantum));
if (image->matte != MagickFalse)
{
p=PushCharPixel(p,&quantum);
- SetOpacityPixelComponent(pixel,ScaleCharToQuantum(quantum));
+ SetPixelOpacity(pixel,ScaleCharToQuantum(quantum));
}
if (image->colorspace == CMYKColorspace)
{
p=PushCharPixel(p,&quantum);
- SetBlackPixelComponent(index,ScaleCharToQuantum(quantum));
+ SetPixelBlack(index,ScaleCharToQuantum(quantum));
}
break;
}
quantum;
p=PushShortPixel(MSBEndian,p,&quantum);
- SetRedPixelComponent(pixel,quantum >> (image->depth-
+ SetPixelRed(pixel,quantum >> (image->depth-
MAGICKCORE_QUANTUM_DEPTH));
p=PushShortPixel(MSBEndian,p,&quantum);
- SetGreenPixelComponent(pixel,quantum >> (image->depth-
+ SetPixelGreen(pixel,quantum >> (image->depth-
MAGICKCORE_QUANTUM_DEPTH));
p=PushShortPixel(MSBEndian,p,&quantum);
- SetBluePixelComponent(pixel,quantum >> (image->depth-
+ SetPixelBlue(pixel,quantum >> (image->depth-
MAGICKCORE_QUANTUM_DEPTH));
if (image->matte != MagickFalse)
{
p=PushShortPixel(MSBEndian,p,&quantum);
- SetOpacityPixelComponent(pixel,quantum >> (image->depth-
+ SetPixelOpacity(pixel,quantum >> (image->depth-
MAGICKCORE_QUANTUM_DEPTH));
}
if (image->colorspace == CMYKColorspace)
{
p=PushShortPixel(MSBEndian,p,&quantum);
- SetBlackPixelComponent(index,quantum >> (image->depth-
+ SetPixelBlack(index,quantum >> (image->depth-
MAGICKCORE_QUANTUM_DEPTH));
}
break;
quantum;
p=PushLongPixel(MSBEndian,p,&quantum);
- SetRedPixelComponent(pixel,quantum >> (image->depth-
+ SetPixelRed(pixel,quantum >> (image->depth-
MAGICKCORE_QUANTUM_DEPTH));
p=PushLongPixel(MSBEndian,p,&quantum);
- SetGreenPixelComponent(pixel,quantum >> (image->depth-
+ SetPixelGreen(pixel,quantum >> (image->depth-
MAGICKCORE_QUANTUM_DEPTH));
p=PushLongPixel(MSBEndian,p,&quantum);
- SetBluePixelComponent(pixel,quantum >> (image->depth-
+ SetPixelBlue(pixel,quantum >> (image->depth-
MAGICKCORE_QUANTUM_DEPTH));
if (image->matte != MagickFalse)
{
p=PushLongPixel(MSBEndian,p,&quantum);
- SetOpacityPixelComponent(pixel,quantum >> (image->depth-
+ SetPixelOpacity(pixel,quantum >> (image->depth-
MAGICKCORE_QUANTUM_DEPTH));
}
if (image->colorspace == CMYKColorspace)
{
p=PushLongPixel(MSBEndian,p,&quantum);
- SetIndexPixelComponent(index,quantum >> (image->depth-
+ SetPixelIndex(index,quantum >> (image->depth-
MAGICKCORE_QUANTUM_DEPTH));
}
break;
length--;
if ((image->storage_class == PseudoClass) ||
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,pixel.red);
- SetGreenPixelComponent(q,pixel.green);
- SetBluePixelComponent(q,pixel.blue);
- SetOpacityPixelComponent(q,pixel.opacity);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRed(q,pixel.red);
+ SetPixelGreen(q,pixel.green);
+ SetPixelBlue(q,pixel.blue);
+ SetPixelOpacity(q,pixel.opacity);
q++;
}
break;
if ((length < 255) && (x < (ssize_t) (image->columns-1)) &&
(IsColorEqual(p,&pixel) != MagickFalse) &&
((image->matte == MagickFalse) ||
- (GetOpacityPixelComponent(p) == pixel.opacity)) &&
+ (GetPixelOpacity(p) == pixel.opacity)) &&
((indexes == (IndexPacket *) NULL) ||
- (index == GetIndexPixelComponent(indexes+x))))
+ (index == GetPixelIndex(indexes+x))))
length++;
else
{
}
pixel=(*p);
if (indexes != (IndexPacket *) NULL)
- index=GetIndexPixelComponent(indexes+x);
+ index=GetPixelIndex(indexes+x);
p++;
}
q=PopRunlengthPacket(image,q,length,pixel,index);
if (bit == 0)
byte=(size_t) ReadBlobByte(image);
if (image_info->endian == LSBEndian)
- SetIndexPixelComponent(indexes+x,((byte & 0x01) != 0) ? 0x00 : 0x01);
+ SetPixelIndex(indexes+x,((byte & 0x01) != 0) ? 0x00 : 0x01);
else
- SetIndexPixelComponent(indexes+x,((byte & 0x01) != 0) ? 0x01 : 0x00);
+ SetPixelIndex(indexes+x,((byte & 0x01) != 0) ? 0x01 : 0x00);
bit++;
if (bit == 8)
bit=0;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
q=pixels;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
(void) WriteBlob(image,(size_t) (q-pixels),pixels);
if (byte == EOF)
ThrowReaderException(CorruptImageError,"CorruptImage");
}
- SetIndexPixelComponent(indexes+x,(byte & (0x01 << (7-bit))) ?
+ SetPixelIndex(indexes+x,(byte & (0x01 << (7-bit))) ?
0x00 : 0x01);
bit++;
if (bit == 8)
i;
for (i=0; i < 256; i++)
- if (ScaleQuantumToChar(GetRedPixelComponent(pixel)) == PalmPalette[i][0] &&
- ScaleQuantumToChar(GetGreenPixelComponent(pixel)) == PalmPalette[i][1] &&
- ScaleQuantumToChar(GetBluePixelComponent(pixel)) == PalmPalette[i][2])
+ if (ScaleQuantumToChar(GetPixelRed(pixel)) == PalmPalette[i][0] &&
+ ScaleQuantumToChar(GetPixelGreen(pixel)) == PalmPalette[i][1] &&
+ ScaleQuantumToChar(GetPixelBlue(pixel)) == PalmPalette[i][2])
return(i);
return(-1);
}
{
color16=(*ptr++ << 8);
color16|=(*ptr++);
- SetRedPixelComponent(q,(QuantumRange*((color16 >> 11) & 0x1f))/
+ SetPixelRed(q,(QuantumRange*((color16 >> 11) & 0x1f))/
0x1f);
- SetGreenPixelComponent(q,(QuantumRange*((color16 >> 5) & 0x3f))/
+ SetPixelGreen(q,(QuantumRange*((color16 >> 5) & 0x3f))/
0x3f);
- SetBluePixelComponent(q,(QuantumRange*((color16 >> 0) & 0x1f))/
+ SetPixelBlue(q,(QuantumRange*((color16 >> 0) & 0x1f))/
0x1f);
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
}
if ((size_t) (ptr-one_row) >= bytes_per_row)
ThrowReaderException(CorruptImageError,"CorruptImage");
index=(IndexPacket) (mask-(((*ptr) & (mask << bit)) >> bit));
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
if (bit)
bit-=bits_per_pixel;
else
p=GetAuthenticPixels(image,0,y,image->columns,1,&exception);
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,FindColor(&image->colormap[
- (ssize_t) GetIndexPixelComponent(indexes+x)]));
+ SetPixelIndex(indexes+x,FindColor(&image->colormap[
+ (ssize_t) GetPixelIndex(indexes+x)]));
}
affinity_image=DestroyImage(affinity_image);
}
{
for (x=0; x < (int) image->columns; x++)
{
- color16=(unsigned short) ((((31*(size_t) GetRedPixelComponent(p))/
+ color16=(unsigned short) ((((31*(size_t) GetPixelRed(p))/
(size_t) QuantumRange) << 11) |
- (((63*(size_t) GetGreenPixelComponent(p))/(size_t) QuantumRange) << 5) |
- ((31*(size_t) GetBluePixelComponent(p))/(size_t) QuantumRange));
- if (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity)
+ (((63*(size_t) GetPixelGreen(p))/(size_t) QuantumRange) << 5) |
+ ((31*(size_t) GetPixelBlue(p))/(size_t) QuantumRange));
+ if (GetPixelOpacity(p) == (Quantum) TransparentOpacity)
{
- transpix.red=GetRedPixelComponent(p);
- transpix.green=GetGreenPixelComponent(p);
- transpix.blue=GetBluePixelComponent(p);
- transpix.opacity=GetOpacityPixelComponent(p);
+ transpix.red=GetPixelRed(p);
+ transpix.green=GetPixelGreen(p);
+ transpix.blue=GetPixelBlue(p);
+ transpix.opacity=GetPixelOpacity(p);
flags|=PALM_HAS_TRANSPARENCY_FLAG;
}
*ptr++=(unsigned char) ((color16 >> 8) & 0xff);
for (x=0; x < (int) image->columns; x++)
{
if (bits_per_pixel >= 8)
- color=(unsigned char) GetIndexPixelComponent(indexes+x);
+ color=(unsigned char) GetPixelIndex(indexes+x);
else
- color=(unsigned char) (GetIndexPixelComponent(indexes+x)*
+ color=(unsigned char) (GetPixelIndex(indexes+x)*
((one << bits_per_pixel)-1)/MagickMax(1*image->colors-1,1));
byte|=color << bit;
if (bit != 0)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*yy++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*c1++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*c2++));
+ SetPixelRed(q,ScaleCharToQuantum(*yy++));
+ SetPixelGreen(q,ScaleCharToQuantum(*c1++));
+ SetPixelBlue(q,ScaleCharToQuantum(*c2++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*yy++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*c1++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*c2++));
+ SetPixelRed(q,ScaleCharToQuantum(*yy++));
+ SetPixelGreen(q,ScaleCharToQuantum(*c1++));
+ SetPixelBlue(q,ScaleCharToQuantum(*c2++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) (tile_image->columns << 1); x++)
{
- (void) WriteBlobByte(image,ScaleQuantumToChar(GetRedPixelComponent(p)));
+ (void) WriteBlobByte(image,ScaleQuantumToChar(GetPixelRed(p)));
p++;
}
q=GetVirtualPixels(downsample_image,0,y >> 1,downsample_image->columns,
break;
for (x=0; x < (ssize_t) downsample_image->columns; x++)
{
- (void) WriteBlobByte(image,ScaleQuantumToChar(GetGreenPixelComponent(q)));
+ (void) WriteBlobByte(image,ScaleQuantumToChar(GetPixelGreen(q)));
q++;
}
q=GetVirtualPixels(downsample_image,0,y >> 1,downsample_image->columns,
break;
for (x=0; x < (ssize_t) downsample_image->columns; x++)
{
- (void) WriteBlobByte(image,ScaleQuantumToChar(GetBluePixelComponent(q)));
+ (void) WriteBlobByte(image,ScaleQuantumToChar(GetPixelBlue(q)));
q++;
}
status=SetImageProgress(image,SaveImageTag,y,tile_image->rows);
Colormapped image.
*/
for (x=0; x < (ssize_t) image->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
break;
}
case 24:
*/
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
if (image->storage_class == PseudoClass)
- SetIndexPixelComponent(indexes+x,*r++);
+ SetPixelIndex(indexes+x,*r++);
else
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*r++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*r++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*r++));
+ SetPixelRed(q,ScaleCharToQuantum(*r++));
+ SetPixelGreen(q,ScaleCharToQuantum(*r++));
+ SetPixelBlue(q,ScaleCharToQuantum(*r++));
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*r++));
+ SetPixelAlpha(q,ScaleCharToQuantum(*r++));
}
q++;
}
{
for (x=0; x < (ssize_t) pcx_info.bytes_per_line; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
p++;
}
break;
{
for (x=0; x < (ssize_t) pcx_info.bytes_per_line; x++)
{
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
p++;
}
break;
{
for (x=0; x < (ssize_t) pcx_info.bytes_per_line; x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
break;
for (x=(ssize_t) pcx_info.bytes_per_line; x != 0; x--)
{
*q++=ScaleQuantumToChar((Quantum)
- (GetAlphaPixelComponent(p)));
+ (GetPixelAlpha(p)));
p++;
}
break;
indexes=GetVirtualIndexQueue(image);
q=pcx_pixels;
for (x=0; x < (ssize_t) image->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
if (PCXWritePixels(&pcx_info,pcx_pixels,image) == MagickFalse)
break;
if (image->previous == (Image *) NULL)
for (x=0; x < (ssize_t) image->columns; x++)
{
byte<<=1;
- if (GetIndexPixelComponent(indexes+x) == polarity)
+ if (GetPixelIndex(indexes+x) == polarity)
byte|=0x01;
bit++;
if (bit == 8)
for (bit=0; bit < 8; bit++)
{
index=(IndexPacket) (*p & (0x80 >> bit) ? 0x00 : 0x01);
- SetIndexPixelComponent(indexes+x+bit,index);
+ SetPixelIndex(indexes+x+bit,index);
}
p++;
}
for (x=0; x < (ssize_t) image->columns; x+=4)
{
index=ConstrainColormapIndex(image,3UL-((*p >> 6) & 0x03));
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
index=ConstrainColormapIndex(image,3UL-((*p >> 4) & 0x03));
- SetIndexPixelComponent(indexes+x+1,index);
+ SetPixelIndex(indexes+x+1,index);
index=ConstrainColormapIndex(image,3UL-((*p >> 2) & 0x03));
- SetIndexPixelComponent(indexes+x+2,index);
+ SetPixelIndex(indexes+x+2,index);
index=ConstrainColormapIndex(image,3UL-((*p) & 0x03));
- SetIndexPixelComponent(indexes+x+3,index);
+ SetPixelIndex(indexes+x+3,index);
p++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x+=2)
{
index=ConstrainColormapIndex(image,15UL-((*p >> 4) & 0x0f));
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
index=ConstrainColormapIndex(image,15UL-((*p) & 0x0f));
- SetIndexPixelComponent(indexes+x+1,index);
+ SetPixelIndex(indexes+x+1,index);
p++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
if (image->colorspace == CMYKColorspace)
- *q++=ScaleQuantumToChar(GetIndexPixelComponent(indexes+x));
+ *q++=ScaleQuantumToChar(GetPixelIndex(indexes+x));
p++;
}
if (image->previous == (Image *) NULL)
for (x=0; x < (ssize_t) image->columns; x++)
{
Ascii85Encode(image,ScaleQuantumToChar(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
Ascii85Encode(image,ScaleQuantumToChar(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
Ascii85Encode(image,ScaleQuantumToChar(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
if (image->colorspace == CMYKColorspace)
Ascii85Encode(image,ScaleQuantumToChar(
- GetIndexPixelComponent(indexes+x)));
+ GetPixelIndex(indexes+x)));
p++;
}
if (image->previous == (Image *) NULL)
break;
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
if (image->previous == (Image *) NULL)
{
status=SetImageProgress(image,SaveImageTag,
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
Ascii85Encode(image,(unsigned char)
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
if (image->previous == (Image *) NULL)
{
status=SetImageProgress(image,SaveImageTag,
indexes=GetVirtualIndexQueue(tile_image);
for (x=0; x < (ssize_t) tile_image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
if (image->colorspace == CMYKColorspace)
- *q++=ScaleQuantumToChar(GetIndexPixelComponent(indexes+x));
+ *q++=ScaleQuantumToChar(GetPixelIndex(indexes+x));
p++;
}
}
for (x=0; x < (ssize_t) tile_image->columns; x++)
{
Ascii85Encode(image,ScaleQuantumToChar(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
Ascii85Encode(image,ScaleQuantumToChar(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
Ascii85Encode(image,ScaleQuantumToChar(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
if (image->colorspace == CMYKColorspace)
Ascii85Encode(image,ScaleQuantumToChar(
- GetIndexPixelComponent(indexes+x)));
+ GetPixelIndex(indexes+x)));
p++;
}
}
break;
indexes=GetVirtualIndexQueue(tile_image);
for (x=0; x < (ssize_t) tile_image->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
}
#if defined(MAGICKCORE_ZLIB_DELEGATE)
if (compression == ZipCompression)
indexes=GetVirtualIndexQueue(tile_image);
for (x=0; x < (ssize_t) tile_image->columns; x++)
Ascii85Encode(image,(unsigned char)
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
}
Ascii85Flush(image);
break;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToChar((Quantum) (GetPixelAlpha(p)));
p++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
Ascii85Encode(image,ScaleQuantumToChar((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p))));
+ GetPixelOpacity(p))));
p++;
}
}
if (tile_image->storage_class == PseudoClass)
{
index=ConstrainColormapIndex(tile_image,*p);
- SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,
+ SetPixelIndex(indexes+x,index);
+ SetPixelRed(q,
tile_image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,
+ SetPixelGreen(q,
tile_image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,
+ SetPixelBlue(q,
tile_image->colormap[(ssize_t) index].blue);
}
else
{
i=(*p++);
j=(*p);
- SetRedPixelComponent(q,ScaleCharToQuantum(
+ SetPixelRed(q,ScaleCharToQuantum(
(unsigned char) ((i & 0x7c) << 1)));
- SetGreenPixelComponent(q,ScaleCharToQuantum(
+ SetPixelGreen(q,ScaleCharToQuantum(
(unsigned char) (((i & 0x03) << 6) |
((j & 0xe0) >> 2))));
- SetBluePixelComponent(q,ScaleCharToQuantum(
+ SetPixelBlue(q,ScaleCharToQuantum(
(unsigned char) ((j & 0x1f) << 3)));
}
else
if (p > (pixels+extent+2*image->columns))
ThrowReaderException(CorruptImageError,
"NotEnoughPixelData");
- SetRedPixelComponent(q,ScaleCharToQuantum(*p));
- SetGreenPixelComponent(q,ScaleCharToQuantum(
+ SetPixelRed(q,ScaleCharToQuantum(*p));
+ SetPixelGreen(q,ScaleCharToQuantum(
*(p+tile_image->columns)));
- SetBluePixelComponent(q,ScaleCharToQuantum(
+ SetPixelBlue(q,ScaleCharToQuantum(
*(p+2*tile_image->columns)));
}
else
if (p > (pixels+extent+3*image->columns))
ThrowReaderException(CorruptImageError,
"NotEnoughPixelData");
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*p));
- SetRedPixelComponent(q,ScaleCharToQuantum(
+ SetPixelAlpha(q,ScaleCharToQuantum(*p));
+ SetPixelRed(q,ScaleCharToQuantum(
*(p+tile_image->columns)));
- SetGreenPixelComponent(q,ScaleCharToQuantum(
+ SetPixelGreen(q,ScaleCharToQuantum(
*(p+2*tile_image->columns)));
- SetBluePixelComponent(q,ScaleCharToQuantum(
+ SetPixelBlue(q,ScaleCharToQuantum(
*(p+3*tile_image->columns)));
}
}
break;
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- scanline[x]=(unsigned char) GetIndexPixelComponent(indexes+x);
+ scanline[x]=(unsigned char) GetPixelIndex(indexes+x);
count+=EncodeImage(image,scanline,(size_t) (row_bytes & 0x7FFF),
packed_scanline);
if (image->previous == (Image *) NULL)
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- *red++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *green++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *blue++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *red++=ScaleQuantumToChar(GetPixelRed(p));
+ *green++=ScaleQuantumToChar(GetPixelGreen(p));
+ *blue++=ScaleQuantumToChar(GetPixelBlue(p));
if (image->matte != MagickFalse)
*opacity++=ScaleQuantumToChar((Quantum)
- (GetAlphaPixelComponent(p)));
+ (GetPixelAlpha(p)));
p++;
}
count+=EncodeImage(image,scanline,bytes_per_line & 0x7FFF,
}
}
if (image->storage_class == PseudoClass)
- SetIndexPixelComponent(indexes+x,index);
- SetBluePixelComponent(q,blue);
- SetGreenPixelComponent(q,green);
- SetRedPixelComponent(q,red);
+ SetPixelIndex(indexes+x,index);
+ SetPixelBlue(q,blue);
+ SetPixelGreen(q,green);
+ SetPixelRed(q,red);
length--;
q++;
}
if (q == (PixelPacket *) NULL)
return;
range=GetQuantumRange(16UL);
- SetRedPixelComponent(q,ScaleAnyToQuantum((size_t) (65535.0*
+ SetPixelRed(q,ScaleAnyToQuantum((size_t) (65535.0*
GetPseudoRandomValue(random_info)+0.5),range));
- SetGreenPixelComponent(q,ScaleAnyToQuantum((size_t) (65535.0*
+ SetPixelGreen(q,ScaleAnyToQuantum((size_t) (65535.0*
GetPseudoRandomValue(random_info)+0.5),range));
- SetBluePixelComponent(q,ScaleAnyToQuantum((size_t) (65535.0*
+ SetPixelBlue(q,ScaleAnyToQuantum((size_t) (65535.0*
GetPseudoRandomValue(random_info)+0.5),range));
(void) SyncAuthenticPixels(image,exception);
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,QuantumRange/2);
+ SetPixelOpacity(q,QuantumRange/2);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
LBR01OpacityPixelPacketComponent((pixelpacket)); \
}
-#define LBR01RedPixelComponent(pixel) \
- (ScaleQuantumToChar(GetRedPixelComponent((pixel))) < 0x10 ? \
+#define LBR01PixelRed(pixel) \
+ (ScaleQuantumToChar(GetPixelRed((pixel))) < 0x10 ? \
0 : QuantumRange);
-#define LBR01GreenPixelComponent(pixel) \
- (ScaleQuantumToChar(GetGreenPixelComponent((pixel))) < 0x10 ? \
+#define LBR01PixelGreen(pixel) \
+ (ScaleQuantumToChar(GetPixelGreen((pixel))) < 0x10 ? \
0 : QuantumRange);
-#define LBR01BluePixelComponent(pixel) \
- (ScaleQuantumToChar(GetBluePixelComponent((pixel))) < 0x10 ? \
+#define LBR01PixelBlue(pixel) \
+ (ScaleQuantumToChar(GetPixelBlue((pixel))) < 0x10 ? \
0 : QuantumRange);
-#define LBR01OpacityPixelComponent(pixel) \
- (ScaleQuantumToChar(GetOpacityPixelComponent((pixel))) < 0x10 ? \
+#define LBR01PixelOpacity(pixel) \
+ (ScaleQuantumToChar(GetPixelOpacity((pixel))) < 0x10 ? \
0 : QuantumRange);
-#define LBR01RGBPixelComponent(pixel) \
+#define LBR01PixelRGB(pixel) \
{ \
- LBR01RedPixelComponent((pixel)); \
- LBR01GreenPixelComponent((pixel)); \
- LBR01BluePixelComponent((pixel)); \
+ LBR01PixelRed((pixel)); \
+ LBR01PixelGreen((pixel)); \
+ LBR01PixelBlue((pixel)); \
}
-#define LBR01RGBOPixelComponent(pixel) \
+#define LBR01PixelRGBO(pixel) \
{ \
- LBR01RGBPixelComponent((pixel)); \
- LBR01OpacityPixelComponent((pixel)); \
+ LBR01PixelRGB((pixel)); \
+ LBR01PixelOpacity((pixel)); \
}
/* LBR02: Replicate top 2 bits */
LBR02OpacityPixelPacketComponent((pixelpacket)); \
}
-#define LBR02RedPixelComponent(pixel) \
+#define LBR02PixelRed(pixel) \
{ \
- unsigned char lbr_bits=ScaleQuantumToChar(GetRedPixelComponent((pixel))) \
+ unsigned char lbr_bits=ScaleQuantumToChar(GetPixelRed((pixel))) \
& 0xc0; \
- SetRedPixelComponent((pixel), ScaleCharToQuantum( \
+ SetPixelRed((pixel), ScaleCharToQuantum( \
(lbr_bits | (lbr_bits >> 2) | (lbr_bits >> 4) | (lbr_bits >> 6)))); \
}
-#define LBR02GreenPixelComponent(pixel) \
+#define LBR02PixelGreen(pixel) \
{ \
- unsigned char lbr_bits=ScaleQuantumToChar(GetGreenPixelComponent((pixel)))\
+ unsigned char lbr_bits=ScaleQuantumToChar(GetPixelGreen((pixel)))\
& 0xc0; \
- SetGreenPixelComponent((pixel), ScaleCharToQuantum( \
+ SetPixelGreen((pixel), ScaleCharToQuantum( \
(lbr_bits | (lbr_bits >> 2) | (lbr_bits >> 4) | (lbr_bits >> 6)))); \
}
-#define LBR02BluePixelComponent(pixel) \
+#define LBR02PixelBlue(pixel) \
{ \
unsigned char lbr_bits= \
- ScaleQuantumToChar(GetBluePixelComponent((pixel))) & 0xc0; \
- SetBluePixelComponent((pixel), ScaleCharToQuantum( \
+ ScaleQuantumToChar(GetPixelBlue((pixel))) & 0xc0; \
+ SetPixelBlue((pixel), ScaleCharToQuantum( \
(lbr_bits | (lbr_bits >> 2) | (lbr_bits >> 4) | (lbr_bits >> 6)))); \
}
-#define LBR02OpacityPixelComponent(pixel) \
+#define LBR02PixelOpacity(pixel) \
{ \
unsigned char lbr_bits= \
- ScaleQuantumToChar(GetOpacityPixelComponent((pixel))) & 0xc0; \
- SetOpacityPixelComponent((pixel), ScaleCharToQuantum( \
+ ScaleQuantumToChar(GetPixelOpacity((pixel))) & 0xc0; \
+ SetPixelOpacity((pixel), ScaleCharToQuantum( \
(lbr_bits | (lbr_bits >> 2) | (lbr_bits >> 4) | (lbr_bits >> 6)))); \
}
-#define LBR02RGBPixelComponent(pixel) \
+#define LBR02PixelRGB(pixel) \
{ \
- LBR02RedPixelComponent((pixel)); \
- LBR02GreenPixelComponent((pixel)); \
- LBR02BluePixelComponent((pixel)); \
+ LBR02PixelRed((pixel)); \
+ LBR02PixelGreen((pixel)); \
+ LBR02PixelBlue((pixel)); \
}
-#define LBR02RGBOPixelComponent(pixel) \
+#define LBR02PixelRGBO(pixel) \
{ \
- LBR02RGBPixelComponent((pixel)); \
- LBR02OpacityPixelComponent((pixel)); \
+ LBR02PixelRGB((pixel)); \
+ LBR02PixelOpacity((pixel)); \
}
/* LBR03: Replicate top 3 bits (only used with opaque pixels during
LBR03BluePixelPacketComponent((pixelpacket)); \
}
-#define LBR03RedPixelComponent(pixel) \
+#define LBR03PixelRed(pixel) \
{ \
- unsigned char lbr_bits=ScaleQuantumToChar(GetRedPixelComponent((pixel))) \
+ unsigned char lbr_bits=ScaleQuantumToChar(GetPixelRed((pixel))) \
& 0xe0; \
- SetRedPixelComponent((pixel), ScaleCharToQuantum( \
+ SetPixelRed((pixel), ScaleCharToQuantum( \
(lbr_bits | (lbr_bits >> 3) | (lbr_bits >> 6)))); \
}
-#define LBR03GreenPixelComponent(pixel) \
+#define LBR03PixelGreen(pixel) \
{ \
- unsigned char lbr_bits=ScaleQuantumToChar(GetGreenPixelComponent((pixel)))\
+ unsigned char lbr_bits=ScaleQuantumToChar(GetPixelGreen((pixel)))\
& 0xe0; \
- SetGreenPixelComponent((pixel), ScaleCharToQuantum( \
+ SetPixelGreen((pixel), ScaleCharToQuantum( \
(lbr_bits | (lbr_bits >> 3) | (lbr_bits >> 6)))); \
}
-#define LBR03BluePixelComponent(pixel) \
+#define LBR03PixelBlue(pixel) \
{ \
- unsigned char lbr_bits=ScaleQuantumToChar(GetBluePixelComponent((pixel))) \
+ unsigned char lbr_bits=ScaleQuantumToChar(GetPixelBlue((pixel))) \
& 0xe0; \
- SetBluePixelComponent((pixel), ScaleCharToQuantum( \
+ SetPixelBlue((pixel), ScaleCharToQuantum( \
(lbr_bits | (lbr_bits >> 3) | (lbr_bits >> 6)))); \
}
-#define LBR03RGBPixelComponent(pixel) \
+#define LBR03PixelRGB(pixel) \
{ \
- LBR03RedPixelComponent((pixel)); \
- LBR03GreenPixelComponent((pixel)); \
- LBR03BluePixelComponent((pixel)); \
+ LBR03PixelRed((pixel)); \
+ LBR03PixelGreen((pixel)); \
+ LBR03PixelBlue((pixel)); \
}
/* LBR04: Replicate top 4 bits */
LBR04OpacityPixelPacketComponent((pixelpacket)); \
}
-#define LBR04RedPixelComponent(pixel) \
+#define LBR04PixelRed(pixel) \
{ \
- unsigned char lbr_bits=ScaleQuantumToChar(GetRedPixelComponent((pixel))) \
+ unsigned char lbr_bits=ScaleQuantumToChar(GetPixelRed((pixel))) \
& 0xf0; \
- SetRedPixelComponent((pixel),\
+ SetPixelRed((pixel),\
ScaleCharToQuantum((lbr_bits | (lbr_bits >> 4)))); \
}
-#define LBR04GreenPixelComponent(pixel) \
+#define LBR04PixelGreen(pixel) \
{ \
- unsigned char lbr_bits=ScaleQuantumToChar(GetGreenPixelComponent((pixel)))\
+ unsigned char lbr_bits=ScaleQuantumToChar(GetPixelGreen((pixel)))\
& 0xf0; \
- SetGreenPixelComponent((pixel),\
+ SetPixelGreen((pixel),\
ScaleCharToQuantum((lbr_bits | (lbr_bits >> 4)))); \
}
-#define LBR04BluePixelComponent(pixel) \
+#define LBR04PixelBlue(pixel) \
{ \
unsigned char lbr_bits= \
- ScaleQuantumToChar(GetBluePixelComponent((pixel))) & 0xf0; \
- SetBluePixelComponent((pixel),\
+ ScaleQuantumToChar(GetPixelBlue((pixel))) & 0xf0; \
+ SetPixelBlue((pixel),\
ScaleCharToQuantum((lbr_bits | (lbr_bits >> 4)))); \
}
-#define LBR04OpacityPixelComponent(pixel) \
+#define LBR04PixelOpacity(pixel) \
{ \
unsigned char lbr_bits= \
- ScaleQuantumToChar(GetOpacityPixelComponent((pixel))) & 0xf0; \
- SetOpacityPixelComponent((pixel),\
+ ScaleQuantumToChar(GetPixelOpacity((pixel))) & 0xf0; \
+ SetPixelOpacity((pixel),\
ScaleCharToQuantum((lbr_bits | (lbr_bits >> 4)))); \
}
-#define LBR04RGBPixelComponent(pixel) \
+#define LBR04PixelRGB(pixel) \
{ \
- LBR04RedPixelComponent((pixel)); \
- LBR04GreenPixelComponent((pixel)); \
- LBR04BluePixelComponent((pixel)); \
+ LBR04PixelRed((pixel)); \
+ LBR04PixelGreen((pixel)); \
+ LBR04PixelBlue((pixel)); \
}
-#define LBR04RGBOPixelComponent(pixel) \
+#define LBR04PixelRGBO(pixel) \
{ \
- LBR04RGBPixelComponent((pixel)); \
- LBR04OpacityPixelComponent((pixel)); \
+ LBR04PixelRGB((pixel)); \
+ LBR04PixelOpacity((pixel)); \
}
LBR08OpacityPixelPacketComponent((pixelpacket)); \
}
-#define LBR08RedPixelComponent(pixel) \
+#define LBR08PixelRed(pixel) \
{ \
unsigned char lbr_bits= \
- ScaleQuantumToChar(GetRedPixelComponent((pixel))); \
- SetRedPixelComponent((pixel),\
+ ScaleQuantumToChar(GetPixelRed((pixel))); \
+ SetPixelRed((pixel),\
ScaleCharToQuantum((lbr_bits))); \
}
-#define LBR08GreenPixelComponent(pixel) \
+#define LBR08PixelGreen(pixel) \
{ \
unsigned char lbr_bits= \
- ScaleQuantumToChar(GetGreenPixelComponent((pixel))); \
- SetGreenPixelComponent((pixel),\
+ ScaleQuantumToChar(GetPixelGreen((pixel))); \
+ SetPixelGreen((pixel),\
ScaleCharToQuantum((lbr_bits))); \
}
-#define LBR08BluePixelComponent(pixel) \
+#define LBR08PixelBlue(pixel) \
{ \
unsigned char lbr_bits= \
- ScaleQuantumToChar(GetBluePixelComponent((pixel))); \
- SetBluePixelComponent((pixel),\
+ ScaleQuantumToChar(GetPixelBlue((pixel))); \
+ SetPixelBlue((pixel),\
ScaleCharToQuantum((lbr_bits))); \
}
-#define LBR08OpacityPixelComponent(pixel) \
+#define LBR08PixelOpacity(pixel) \
{ \
unsigned char lbr_bits= \
- ScaleQuantumToChar(GetOpacityPixelComponent((pixel))); \
- SetOpacityPixelComponent((pixel),\
+ ScaleQuantumToChar(GetPixelOpacity((pixel))); \
+ SetPixelOpacity((pixel),\
ScaleCharToQuantum((lbr_bits))); \
}
-#define LBR08RGBPixelComponent(pixel) \
+#define LBR08PixelRGB(pixel) \
{ \
- LBR08RedPixelComponent((pixel)); \
- LBR08GreenPixelComponent((pixel)); \
- LBR08BluePixelComponent((pixel)); \
+ LBR08PixelRed((pixel)); \
+ LBR08PixelGreen((pixel)); \
+ LBR08PixelBlue((pixel)); \
}
-#define LBR08RGBOPixelComponent(pixel) \
+#define LBR08PixelRGBO(pixel) \
{ \
- LBR08RGBPixelComponent((pixel)); \
- LBR08OpacityPixelComponent((pixel)); \
+ LBR08PixelRGB((pixel)); \
+ LBR08PixelOpacity((pixel)); \
}
LBR16OpacityPixelPacketComponent((pixelpacket)); \
}
-#define LBR16RedPixelComponent(pixel) \
+#define LBR16PixelRed(pixel) \
{ \
unsigned short lbr_bits= \
- ScaleQuantumToShort(GetRedPixelComponent((pixel))); \
- SetRedPixelComponent((pixel),\
+ ScaleQuantumToShort(GetPixelRed((pixel))); \
+ SetPixelRed((pixel),\
ScaleShortToQuantum((lbr_bits))); \
}
-#define LBR16GreenPixelComponent(pixel) \
+#define LBR16PixelGreen(pixel) \
{ \
unsigned short lbr_bits= \
- ScaleQuantumToShort(GetGreenPixelComponent((pixel))); \
- SetGreenPixelComponent((pixel),\
+ ScaleQuantumToShort(GetPixelGreen((pixel))); \
+ SetPixelGreen((pixel),\
ScaleShortToQuantum((lbr_bits))); \
}
-#define LBR16BluePixelComponent(pixel) \
+#define LBR16PixelBlue(pixel) \
{ \
unsigned short lbr_bits= \
- ScaleQuantumToShort(GetBluePixelComponent((pixel))); \
- SetBluePixelComponent((pixel),\
+ ScaleQuantumToShort(GetPixelBlue((pixel))); \
+ SetPixelBlue((pixel),\
ScaleShortToQuantum((lbr_bits))); \
}
-#define LBR16OpacityPixelComponent(pixel) \
+#define LBR16PixelOpacity(pixel) \
{ \
unsigned short lbr_bits= \
- ScaleQuantumToShort(GetOpacityPixelComponent((pixel))); \
- SetOpacityPixelComponent((pixel),\
+ ScaleQuantumToShort(GetPixelOpacity((pixel))); \
+ SetPixelOpacity((pixel),\
ScaleShortToQuantum((lbr_bits))); \
}
-#define LBR16RGBPixelComponent(pixel) \
+#define LBR16PixelRGB(pixel) \
{ \
- LBR16RedPixelComponent((pixel)); \
- LBR16GreenPixelComponent((pixel)); \
- LBR16BluePixelComponent((pixel)); \
+ LBR16PixelRed((pixel)); \
+ LBR16PixelGreen((pixel)); \
+ LBR16PixelBlue((pixel)); \
}
-#define LBR16RGBOPixelComponent(pixel) \
+#define LBR16PixelRGBO(pixel) \
{ \
- LBR16RGBPixelComponent((pixel)); \
- LBR16OpacityPixelComponent((pixel)); \
+ LBR16PixelRGB((pixel)); \
+ LBR16PixelOpacity((pixel)); \
}
/*
for (x=(ssize_t) image->columns-1; x >= 0; x--)
{
ok_to_reduce=
- QuantumToCharToQuantumEqQuantum(GetRedPixelComponent(p)) &&
- QuantumToCharToQuantumEqQuantum(GetGreenPixelComponent(p)) &&
- QuantumToCharToQuantumEqQuantum(GetBluePixelComponent(p)) ?
+ QuantumToCharToQuantumEqQuantum(GetPixelRed(p)) &&
+ QuantumToCharToQuantumEqQuantum(GetPixelGreen(p)) &&
+ QuantumToCharToQuantumEqQuantum(GetPixelBlue(p)) ?
MagickTrue : MagickFalse;
if (ok_to_reduce == MagickFalse)
{
if ((ping_color_type == PNG_COLOR_TYPE_RGBA ||
ping_color_type == PNG_COLOR_TYPE_GRAY_ALPHA) &&
- (GetOpacityPixelComponent(q) != OpaqueOpacity))
+ (GetPixelOpacity(q) != OpaqueOpacity))
{
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
}
if ((ping_color_type == PNG_COLOR_TYPE_RGB ||
ping_color_type == PNG_COLOR_TYPE_GRAY) &&
- (ScaleQuantumToShort(GetRedPixelComponent(q))
+ (ScaleQuantumToShort(GetPixelRed(q))
== transparent_color.red &&
- ScaleQuantumToShort(GetGreenPixelComponent(q))
+ ScaleQuantumToShort(GetPixelGreen(q))
== transparent_color.green &&
- ScaleQuantumToShort(GetBluePixelComponent(q))
+ ScaleQuantumToShort(GetPixelBlue(q))
== transparent_color.blue))
{
if (logging != MagickFalse)
* In a PNG datastream, Opaque is QuantumRange
* and Transparent is 0.
*/
- SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelAlpha(q,ScaleCharToQuantum((unsigned char)
*p++));
- if (GetOpacityPixelComponent(q) != OpaqueOpacity)
+ if (GetPixelOpacity(q) != OpaqueOpacity)
found_transparent_pixel = MagickTrue;
q++;
}
{
quantum=((*p++) << 8);
quantum|=(*p++);
- SetAlphaPixelComponent(q,quantum);
- if (GetOpacityPixelComponent(q) != OpaqueOpacity)
+ SetPixelAlpha(q,quantum);
+ if (GetPixelOpacity(q) != OpaqueOpacity)
found_transparent_pixel = MagickTrue;
q++;
}
{
quantum=(*p << 8) | *(p+1);
quantum*=65537L;
- SetOpacityPixelComponent(q,
- (Quantum) GetAlphaPixelComponent(q));
- if (GetOpacityPixelComponent(q) != OpaqueOpacity)
+ SetPixelOpacity(q,
+ (Quantum) GetPixelAlpha(q));
+ if (GetPixelOpacity(q) != OpaqueOpacity)
found_transparent_pixel = MagickTrue;
p+=2;
q++;
if (ping_color_type == 4)
{
- SetAlphaPixelComponent(q,*p++);
- if (GetOpacityPixelComponent(q) != OpaqueOpacity)
+ SetPixelAlpha(q,*p++);
+ if (GetPixelOpacity(q) != OpaqueOpacity)
found_transparent_pixel = MagickTrue;
p++;
q++;
r=quantum_scanline;
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,*r++);
+ SetPixelIndex(indexes+x,*r++);
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
*/
for (x=(ssize_t) image->columns-1; x >= 0; x--)
{
- if (ScaleQuantumToShort(GetRedPixelComponent(q))
+ if (ScaleQuantumToShort(GetPixelRed(q))
== transparent_color.red &&
- ScaleQuantumToShort(GetGreenPixelComponent(q))
+ ScaleQuantumToShort(GetPixelGreen(q))
== transparent_color.green &&
- ScaleQuantumToShort(GetBluePixelComponent(q))
+ ScaleQuantumToShort(GetPixelBlue(q))
== transparent_color.blue)
{
- SetOpacityPixelComponent(q,TransparentOpacity);
+ SetPixelOpacity(q,TransparentOpacity);
}
#if 0 /* I have not found a case where this is needed. */
else
{
- SetOpacityPixelComponent(q)=(Quantum) OpaqueOpacity;
+ SetPixelOpacity(q)=(Quantum) OpaqueOpacity;
}
#endif
if (image->matte != MagickFalse)
for (x=(ssize_t) image->columns; x != 0; x--,q++,s++)
- SetOpacityPixelComponent(q,(Quantum) QuantumRange-
- GetRedPixelComponent(s));
+ SetPixelOpacity(q,(Quantum) QuantumRange-
+ GetPixelRed(s));
else
for (x=(ssize_t) image->columns; x != 0; x--,q++,s++)
{
- SetAlphaPixelComponent(q,GetRedPixelComponent(s));
- if (GetOpacityPixelComponent(q) != OpaqueOpacity)
+ SetPixelAlpha(q,GetPixelRed(s));
+ if (GetPixelOpacity(q) != OpaqueOpacity)
image->matte=MagickTrue;
}
for (x=(ssize_t) image->columns-1; x >= 0; x--)
{
- SetRedPixelComponent(q,ScaleQuantumToShort(
- GetRedPixelComponent(q)));
- SetGreenPixelComponent(q,ScaleQuantumToShort(
- GetGreenPixelComponent(q)));
- SetBluePixelComponent(q,ScaleQuantumToShort(
- GetBluePixelComponent(q)));
- SetOpacityPixelComponent(q,ScaleQuantumToShort(
- GetOpacityPixelComponent(q)));
+ SetPixelRed(q,ScaleQuantumToShort(
+ GetPixelRed(q)));
+ SetPixelGreen(q,ScaleQuantumToShort(
+ GetPixelGreen(q)));
+ SetPixelBlue(q,ScaleQuantumToShort(
+ GetPixelBlue(q)));
+ SetPixelOpacity(q,ScaleQuantumToShort(
+ GetPixelOpacity(q)));
q++;
}
if (magn_methy <= 1)
{
/* replicate previous */
- SetRGBOPixelComponents(q,(pixels));
+ SetPixelRGBO(q,(pixels));
}
else if (magn_methy == 2 || magn_methy == 4)
{
if (i == 0)
{
- SetRGBOPixelComponents(q,(pixels));
+ SetPixelRGBO(q,(pixels));
}
else
{
/* Interpolate */
- SetRedPixelComponent(q,
+ SetPixelRed(q,
((QM) (((ssize_t)
- (2*i*(GetRedPixelComponent(n)
- -GetRedPixelComponent(pixels)+m))/
+ (2*i*(GetPixelRed(n)
+ -GetPixelRed(pixels)+m))/
((ssize_t) (m*2))
- +GetRedPixelComponent(pixels)))));
- SetGreenPixelComponent(q,
+ +GetPixelRed(pixels)))));
+ SetPixelGreen(q,
((QM) (((ssize_t)
- (2*i*(GetGreenPixelComponent(n)
- -GetGreenPixelComponent(pixels)+m))/
+ (2*i*(GetPixelGreen(n)
+ -GetPixelGreen(pixels)+m))/
((ssize_t) (m*2))
- +GetGreenPixelComponent(pixels)))));
- SetBluePixelComponent(q,
+ +GetPixelGreen(pixels)))));
+ SetPixelBlue(q,
((QM) (((ssize_t)
- (2*i*(GetBluePixelComponent(n)
- -GetBluePixelComponent(pixels)+m))/
+ (2*i*(GetPixelBlue(n)
+ -GetPixelBlue(pixels)+m))/
((ssize_t) (m*2))
- +GetBluePixelComponent(pixels)))));
+ +GetPixelBlue(pixels)))));
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,
+ SetPixelOpacity(q,
((QM) (((ssize_t)
- (2*i*(GetOpacityPixelComponent(n)
- -GetOpacityPixelComponent(pixels)+m))
+ (2*i*(GetPixelOpacity(n)
+ -GetPixelOpacity(pixels)+m))
/((ssize_t) (m*2))+
- GetOpacityPixelComponent(pixels)))));
+ GetPixelOpacity(pixels)))));
}
if (magn_methy == 4)
{
/* Replicate nearest */
if (i <= ((m+1) << 1))
- SetOpacityPixelComponent(q,
+ SetPixelOpacity(q,
(*pixels).opacity+0);
else
- SetOpacityPixelComponent(q,
+ SetPixelOpacity(q,
(*n).opacity+0);
}
}
/* Replicate nearest */
if (i <= ((m+1) << 1))
{
- SetRGBOPixelComponents(q,(pixels));
+ SetPixelRGBO(q,(pixels));
}
else
{
- SetRGBOPixelComponents(q,(n));
+ SetPixelRGBO(q,(n));
}
if (magn_methy == 5)
{
- SetOpacityPixelComponent(q,
+ SetPixelOpacity(q,
(QM) (((ssize_t) (2*i*
- (GetOpacityPixelComponent(n)
- -GetOpacityPixelComponent(pixels))
+ (GetPixelOpacity(n)
+ -GetPixelOpacity(pixels))
+m))/((ssize_t) (m*2))
- +GetOpacityPixelComponent(pixels)));
+ +GetPixelOpacity(pixels)));
}
}
n++;
if (magn_methx <= 1)
{
/* replicate previous */
- SetRGBOPixelComponents(q,(pixels));
+ SetPixelRGBO(q,(pixels));
}
else if (magn_methx == 2 || magn_methx == 4)
{
if (i == 0)
{
- SetRGBOPixelComponents(q,(pixels));
+ SetPixelRGBO(q,(pixels));
}
/* To do: Rewrite using Get/Set***PixelComponent() */
else
{
/* Interpolate */
- SetRedPixelComponent(q,
+ SetPixelRed(q,
(QM) ((2*i*(
- GetRedPixelComponent(n)
- -GetRedPixelComponent(pixels))+m)
+ GetPixelRed(n)
+ -GetPixelRed(pixels))+m)
/((ssize_t) (m*2))+
- GetRedPixelComponent(pixels)));
+ GetPixelRed(pixels)));
- SetGreenPixelComponent(q,
+ SetPixelGreen(q,
(QM) ((2*i*(
- GetGreenPixelComponent(n)
- -GetGreenPixelComponent(pixels))+m)
+ GetPixelGreen(n)
+ -GetPixelGreen(pixels))+m)
/((ssize_t) (m*2))+
- GetGreenPixelComponent(pixels)));
+ GetPixelGreen(pixels)));
- SetBluePixelComponent(q,
+ SetPixelBlue(q,
(QM) ((2*i*(
- GetBluePixelComponent(n)
- -GetBluePixelComponent(pixels))+m)
+ GetPixelBlue(n)
+ -GetPixelBlue(pixels))+m)
/((ssize_t) (m*2))+
- GetBluePixelComponent(pixels)));
+ GetPixelBlue(pixels)));
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,
+ SetPixelOpacity(q,
(QM) ((2*i*(
- GetOpacityPixelComponent(n)
- -GetOpacityPixelComponent(pixels))+m)
+ GetPixelOpacity(n)
+ -GetPixelOpacity(pixels))+m)
/((ssize_t) (m*2))+
- GetOpacityPixelComponent(pixels)));
+ GetPixelOpacity(pixels)));
}
if (magn_methx == 4)
/* Replicate nearest */
if (i <= ((m+1) << 1))
{
- SetOpacityPixelComponent(q,
- GetOpacityPixelComponent(pixels)+0);
+ SetPixelOpacity(q,
+ GetPixelOpacity(pixels)+0);
}
else
{
- SetOpacityPixelComponent(q,
- GetOpacityPixelComponent(n)+0);
+ SetPixelOpacity(q,
+ GetPixelOpacity(n)+0);
}
}
}
/* Replicate nearest */
if (i <= ((m+1) << 1))
{
- SetRGBOPixelComponents(q,(pixels));
+ SetPixelRGBO(q,(pixels));
}
else
{
- SetRGBOPixelComponents(q,(n));
+ SetPixelRGBO(q,(n));
}
if (magn_methx == 5)
{
/* Interpolate */
- SetOpacityPixelComponent(q,
- (QM) ((2*i*( GetOpacityPixelComponent(n)
- -GetOpacityPixelComponent(pixels))+m)/
+ SetPixelOpacity(q,
+ (QM) ((2*i*( GetPixelOpacity(n)
+ -GetPixelOpacity(pixels))+m)/
((ssize_t) (m*2))
- +GetOpacityPixelComponent(pixels)));
+ +GetPixelOpacity(pixels)));
}
}
q++;
for (x=(ssize_t) image->columns-1; x >= 0; x--)
{
- SetRedPixelComponent(q,ScaleShortToQuantum(
- GetRedPixelComponent(q)));
- SetGreenPixelComponent(q,ScaleShortToQuantum(
- GetGreenPixelComponent(q)));
- SetBluePixelComponent(q,ScaleShortToQuantum(
- GetBluePixelComponent(q)));
- SetOpacityPixelComponent(q,ScaleShortToQuantum(
- GetOpacityPixelComponent(q)));
+ SetPixelRed(q,ScaleShortToQuantum(
+ GetPixelRed(q)));
+ SetPixelGreen(q,ScaleShortToQuantum(
+ GetPixelGreen(q)));
+ SetPixelBlue(q,ScaleShortToQuantum(
+ GetPixelBlue(q)));
+ SetPixelOpacity(q,ScaleShortToQuantum(
+ GetPixelOpacity(q)));
q++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- LBR16RGBOPixelComponent(r);
+ LBR16PixelRGBO(r);
r++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- LBR08RGBOPixelComponent(r);
+ LBR08PixelRGBO(r);
r++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- LBR04RGBOPixelComponent(r);
+ LBR04PixelRGBO(r);
r++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- LBR02RGBOPixelComponent(r);
+ LBR02PixelRGBO(r);
r++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- LBR01RGBOPixelComponent(r);
+ LBR01PixelRGBO(r);
r++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if (image->matte == MagickFalse ||
- GetOpacityPixelComponent(q) == OpaqueOpacity)
+ GetPixelOpacity(q) == OpaqueOpacity)
{
if (number_opaque < 259)
{
if (number_opaque == 0)
{
- GetRGBPixelComponents(q, opaque);
+ GetPixelRGB(q, opaque);
opaque[0].opacity=OpaqueOpacity;
number_opaque=1;
}
number_opaque < 259)
{
number_opaque++;
- GetRGBPixelComponents(q, opaque+i);
+ GetPixelRGB(q, opaque+i);
opaque[i].opacity=OpaqueOpacity;
}
}
{
if (number_transparent == 0)
{
- GetRGBOPixelComponents(q, transparent);
+ GetPixelRGBO(q, transparent);
ping_trans_color.red=
- (unsigned short) GetRedPixelComponent(q);
+ (unsigned short) GetPixelRed(q);
ping_trans_color.green=
- (unsigned short) GetGreenPixelComponent(q);
+ (unsigned short) GetPixelGreen(q);
ping_trans_color.blue=
- (unsigned short) GetBluePixelComponent(q);
+ (unsigned short) GetPixelBlue(q);
ping_trans_color.gray=
- (unsigned short) GetRedPixelComponent(q);
+ (unsigned short) GetPixelRed(q);
number_transparent = 1;
}
number_transparent < 259)
{
number_transparent++;
- GetRGBOPixelComponents(q, transparent+i);
+ GetPixelRGBO(q, transparent+i);
}
}
}
{
if (number_semitransparent == 0)
{
- GetRGBOPixelComponents(q, semitransparent);
+ GetPixelRGBO(q, semitransparent);
number_semitransparent = 1;
}
for (i=0; i< (ssize_t) number_semitransparent; i++)
{
if (IsColorEqual(q, semitransparent+i)
- && GetOpacityPixelComponent(q) ==
+ && GetPixelOpacity(q) ==
semitransparent[i].opacity)
break;
}
number_semitransparent < 259)
{
number_semitransparent++;
- GetRGBOPixelComponents(q, semitransparent+i);
+ GetPixelRGBO(q, semitransparent+i);
}
}
}
s=q;
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetRedPixelComponent(s) != GetGreenPixelComponent(s)
- || GetRedPixelComponent(s) != GetBluePixelComponent(s))
+ if (GetPixelRed(s) != GetPixelGreen(s)
+ || GetPixelRed(s) != GetPixelBlue(s))
{
ping_have_color=MagickTrue;
ping_have_non_bw=MagickTrue;
s=q;
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetRedPixelComponent(s) != 0 &&
- GetRedPixelComponent(s) != QuantumRange)
+ if (GetPixelRed(s) != 0 &&
+ GetPixelRed(s) != QuantumRange)
{
ping_have_non_bw=MagickTrue;
}
{
if ((image->matte == MagickFalse ||
image->colormap[i].opacity ==
- GetOpacityPixelComponent(q)) &&
+ GetPixelOpacity(q)) &&
image->colormap[i].red ==
- GetRedPixelComponent(q) &&
+ GetPixelRed(q) &&
image->colormap[i].green ==
- GetGreenPixelComponent(q) &&
+ GetPixelGreen(q) &&
image->colormap[i].blue ==
- GetBluePixelComponent(q))
+ GetPixelBlue(q))
{
- SetIndexPixelComponent(indexes+x,i);
+ SetPixelIndex(indexes+x,i);
break;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(r) > TransparentOpacity/2)
+ if (GetPixelOpacity(r) > TransparentOpacity/2)
{
- SetOpacityPixelComponent(r,TransparentOpacity);
- SetRGBPixelComponents(r,&image->background_color);
+ SetPixelOpacity(r,TransparentOpacity);
+ SetPixelRGB(r,&image->background_color);
}
else
- SetOpacityPixelComponent(r,OpaqueOpacity);
+ SetPixelOpacity(r,OpaqueOpacity);
r++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(r) == OpaqueOpacity)
- LBR04RGBPixelComponent(r);
+ if (GetPixelOpacity(r) == OpaqueOpacity)
+ LBR04PixelRGB(r);
r++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(r) == OpaqueOpacity)
- LBR03RGBPixelComponent(r);
+ if (GetPixelOpacity(r) == OpaqueOpacity)
+ LBR03PixelRGB(r);
r++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(r) == OpaqueOpacity)
- LBR02BluePixelComponent(r);
+ if (GetPixelOpacity(r) == OpaqueOpacity)
+ LBR02PixelBlue(r);
r++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (ScaleQuantumToChar(GetRedPixelComponent(r)) == 0x49 &&
- ScaleQuantumToChar(GetGreenPixelComponent(r)) == 0x00 &&
- ScaleQuantumToChar(GetBluePixelComponent(r)) == 0x00 &&
- GetOpacityPixelComponent(r) == OpaqueOpacity)
+ if (ScaleQuantumToChar(GetPixelRed(r)) == 0x49 &&
+ ScaleQuantumToChar(GetPixelGreen(r)) == 0x00 &&
+ ScaleQuantumToChar(GetPixelBlue(r)) == 0x00 &&
+ GetPixelOpacity(r) == OpaqueOpacity)
{
- SetRedPixelComponent(r,ScaleCharToQuantum(0x24));
+ SetPixelRed(r,ScaleCharToQuantum(0x24));
}
r++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if (q->opacity != TransparentOpacity &&
- (unsigned short) GetRedPixelComponent(q) ==
+ (unsigned short) GetPixelRed(q) ==
ping_trans_color.red &&
- (unsigned short) GetGreenPixelComponent(q) ==
+ (unsigned short) GetPixelGreen(q) ==
ping_trans_color.green &&
- (unsigned short) GetBluePixelComponent(q) ==
+ (unsigned short) GetPixelBlue(q) ==
ping_trans_color.blue)
{
ping_have_cheap_transparency = MagickFalse;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,PNMInteger(image,2) == 0 ? QuantumRange : 0);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,PNMInteger(image,2) == 0 ? QuantumRange : 0);
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
intensity=PNMInteger(image,10);
- SetRedPixelComponent(q,intensity);
+ SetPixelRed(q,intensity);
if (scale != (Quantum *) NULL)
- SetRedPixelComponent(q,scale[ConstrainPixel(image,(ssize_t)
+ SetPixelRed(q,scale[ConstrainPixel(image,(ssize_t)
intensity,max_value)]);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
pixel.blue=(MagickRealType) scale[ConstrainPixel(image,(ssize_t)
pixel.blue,max_value)];
}
- SetRedPixelComponent(q,pixel.red);
- SetGreenPixelComponent(q,pixel.green);
- SetBluePixelComponent(q,pixel.blue);
+ SetPixelRed(q,pixel.red);
+ SetPixelGreen(q,pixel.green);
+ SetPixelBlue(q,pixel.blue);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushShortPixel(MSBEndian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
}
if (image->depth == 8)
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
q->opacity=OpaqueOpacity;
q++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushShortPixel(MSBEndian,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelRed(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(MSBEndian,p,&pixel);
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(MSBEndian,p,&pixel);
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelBlue(q,ScaleShortToQuantum(pixel));
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushCharPixel(p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushCharPixel(p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushShortPixel(MSBEndian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushShortPixel(MSBEndian,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushShortPixel(MSBEndian,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
{
p=PushCharPixel(p,&pixel);
- SetOpacityPixelComponent(q,ScaleAnyToQuantum(pixel,
+ SetPixelOpacity(q,ScaleAnyToQuantum(pixel,
range));
}
q++;
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushShortPixel(MSBEndian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
{
p=PushShortPixel(MSBEndian,p,&pixel);
- SetOpacityPixelComponent(q,ScaleAnyToQuantum(pixel,
+ SetPixelOpacity(q,ScaleAnyToQuantum(pixel,
range));
}
q++;
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushCharPixel(p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushCharPixel(p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushCharPixel(p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleAnyToQuantum(pixel,
+ SetPixelIndex(indexes+x,ScaleAnyToQuantum(pixel,
range));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
{
p=PushCharPixel(p,&pixel);
- SetOpacityPixelComponent(q,ScaleAnyToQuantum(pixel,
+ SetPixelOpacity(q,ScaleAnyToQuantum(pixel,
range));
}
q++;
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushShortPixel(MSBEndian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushShortPixel(MSBEndian,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushShortPixel(MSBEndian,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushShortPixel(MSBEndian,p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleAnyToQuantum(pixel,
+ SetPixelIndex(indexes+x,ScaleAnyToQuantum(pixel,
range));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
{
p=PushShortPixel(MSBEndian,p,&pixel);
- SetOpacityPixelComponent(q,ScaleAnyToQuantum(pixel,
+ SetPixelOpacity(q,ScaleAnyToQuantum(pixel,
range));
}
q++;
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushCharPixel(p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushCharPixel(p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
{
p=PushCharPixel(p,&pixel);
- SetOpacityPixelComponent(q,ScaleAnyToQuantum(pixel,
+ SetPixelOpacity(q,ScaleAnyToQuantum(pixel,
range));
}
q++;
for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushShortPixel(MSBEndian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushShortPixel(MSBEndian,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushShortPixel(MSBEndian,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
{
p=PushShortPixel(MSBEndian,p,&pixel);
- SetOpacityPixelComponent(q,ScaleAnyToQuantum(pixel,
+ SetPixelOpacity(q,ScaleAnyToQuantum(pixel,
range));
}
q++;
{
if (image->depth <= 8)
count=(ssize_t) FormatLocaleString(buffer,MaxTextExtent,
- "%u %u %u ",ScaleQuantumToChar(GetRedPixelComponent(p)),
- ScaleQuantumToChar(GetGreenPixelComponent(p)),
- ScaleQuantumToChar(GetBluePixelComponent(p)));
+ "%u %u %u ",ScaleQuantumToChar(GetPixelRed(p)),
+ ScaleQuantumToChar(GetPixelGreen(p)),
+ ScaleQuantumToChar(GetPixelBlue(p)));
else
count=(ssize_t) FormatLocaleString(buffer,MaxTextExtent,
- "%u %u %u ",ScaleQuantumToShort(GetRedPixelComponent(p)),
- ScaleQuantumToShort(GetGreenPixelComponent(p)),
- ScaleQuantumToShort(GetBluePixelComponent(p)));
+ "%u %u %u ",ScaleQuantumToShort(GetPixelRed(p)),
+ ScaleQuantumToShort(GetPixelGreen(p)),
+ ScaleQuantumToShort(GetPixelBlue(p)));
extent=(size_t) count;
(void) strncpy((char *) q,buffer,extent);
q+=extent;
else
{
if (image->depth == 8)
- pixel=ScaleQuantumToChar(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelRed(p));
else
- pixel=ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelRed(p),range);
}
q=PopCharPixel((unsigned char) pixel,q);
p++;
else
{
if (image->depth == 16)
- pixel=ScaleQuantumToShort(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelRed(p));
else
- pixel=ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelRed(p),range);
}
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
p++;
if (image->depth <= 8)
for (x=0; x < (ssize_t) image->columns; x++)
{
- pixel=ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelRed(p),range);
q=PopCharPixel((unsigned char) pixel,q);
- pixel=ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopCharPixel((unsigned char) pixel,q);
- pixel=ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopCharPixel((unsigned char) pixel,q);
p++;
}
else
for (x=0; x < (ssize_t) image->columns; x++)
{
- pixel=ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelRed(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
- pixel=ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
- pixel=ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
p++;
}
if (image->matte != MagickFalse)
{
pixel=(unsigned char) ScaleQuantumToAny(
- GetOpacityPixelComponent(p),range);
+ GetPixelOpacity(p),range);
q=PopCharPixel((unsigned char) pixel,q);
}
p++;
if (image->matte != MagickFalse)
{
pixel=(unsigned char) ScaleQuantumToAny(
- GetOpacityPixelComponent(p),range);
+ GetPixelOpacity(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
}
p++;
if (image->depth <= 8)
for (x=0; x < (ssize_t) image->columns; x++)
{
- pixel=ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelRed(p),range);
q=PopCharPixel((unsigned char) pixel,q);
- pixel=ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopCharPixel((unsigned char) pixel,q);
- pixel=ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopCharPixel((unsigned char) pixel,q);
pixel=ScaleQuantumToAny(
- GetIndexPixelComponent(indexes+x),range);
+ GetPixelIndex(indexes+x),range);
q=PopCharPixel((unsigned char) pixel,q);
if (image->matte != MagickFalse)
{
pixel=ScaleQuantumToAny((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)),range);
+ GetPixelOpacity(p)),range);
q=PopCharPixel((unsigned char) pixel,q);
}
p++;
else
for (x=0; x < (ssize_t) image->columns; x++)
{
- pixel=ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelRed(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
- pixel=ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
- pixel=ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
pixel=ScaleQuantumToAny(
- GetIndexPixelComponent(indexes+x),range);
+ GetPixelIndex(indexes+x),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
if (image->matte != MagickFalse)
{
pixel=ScaleQuantumToAny((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)),range);
+ GetPixelOpacity(p)),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
}
p++;
if (image->depth <= 8)
for (x=0; x < (ssize_t) image->columns; x++)
{
- pixel=ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelRed(p),range);
q=PopCharPixel((unsigned char) pixel,q);
- pixel=ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopCharPixel((unsigned char) pixel,q);
- pixel=ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopCharPixel((unsigned char) pixel,q);
if (image->matte != MagickFalse)
{
pixel=ScaleQuantumToAny((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)),range);
+ GetPixelOpacity(p)),range);
q=PopCharPixel((unsigned char) pixel,q);
}
p++;
else
for (x=0; x < (ssize_t) image->columns; x++)
{
- pixel=ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelRed(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
- pixel=ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
- pixel=ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
if (image->matte != MagickFalse)
{
pixel=ScaleQuantumToAny((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)),range);
+ GetPixelOpacity(p)),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
}
p++;
#define WriteRunlengthPacket(image,pixel,length,p) \
{ \
if ((image->matte != MagickFalse) && \
- (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity)) \
+ (GetPixelOpacity(p) == (Quantum) TransparentOpacity)) \
{ \
q=PopHexPixel(hex_digits,0xff,q); \
q=PopHexPixel(hex_digits,0xff,q); \
length=255;
for (x=0; x < (ssize_t) image->columns; x++)
{
- if ((GetRedPixelComponent(p) == pixel.red) &&
- (GetGreenPixelComponent(p) == pixel.green) &&
- (GetBluePixelComponent(p) == pixel.blue) &&
- (GetOpacityPixelComponent(p) == pixel.opacity) &&
+ if ((GetPixelRed(p) == pixel.red) &&
+ (GetPixelGreen(p) == pixel.green) &&
+ (GetPixelBlue(p) == pixel.blue) &&
+ (GetPixelOpacity(p) == pixel.opacity) &&
(length < 255) && (x < (ssize_t) (image->columns-1)))
length++;
else
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((image->matte != MagickFalse) &&
- (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity))
+ (GetPixelOpacity(p) == (Quantum) TransparentOpacity))
{
q=PopHexPixel(hex_digits,0xff,q);
q=PopHexPixel(hex_digits,0xff,q);
else
{
q=PopHexPixel(hex_digits,ScaleQuantumToChar(
- GetRedPixelComponent(p)),q);
+ GetPixelRed(p)),q);
q=PopHexPixel(hex_digits,ScaleQuantumToChar(
- GetGreenPixelComponent(p)),q);
+ GetPixelGreen(p)),q);
q=PopHexPixel(hex_digits,ScaleQuantumToChar(
- GetBluePixelComponent(p)),q);
+ GetPixelBlue(p)),q);
}
if ((q-pixels+6) >= 80)
{
if (p == (const PixelPacket *) NULL)
break;
indexes=GetVirtualIndexQueue(image);
- index=GetIndexPixelComponent(indexes);
+ index=GetPixelIndex(indexes);
length=255;
for (x=0; x < (ssize_t) image->columns; x++)
{
- if ((index == GetIndexPixelComponent(indexes+x)) &&
+ if ((index == GetPixelIndex(indexes+x)) &&
(length < 255) && (x < ((ssize_t) image->columns-1)))
length++;
else
}
length=0;
}
- index=GetIndexPixelComponent(indexes+x);
- pixel.red=GetRedPixelComponent(p);
- pixel.green=GetGreenPixelComponent(p);
- pixel.blue=GetBluePixelComponent(p);
- pixel.opacity=GetOpacityPixelComponent(p);
+ index=GetPixelIndex(indexes+x);
+ pixel.red=GetPixelRed(p);
+ pixel.green=GetPixelGreen(p);
+ pixel.blue=GetPixelBlue(p);
+ pixel.opacity=GetPixelOpacity(p);
p++;
}
q=PopHexPixel(hex_digits,(size_t) index,q);
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
- q=PopHexPixel(hex_digits,(size_t) GetIndexPixelComponent(
+ q=PopHexPixel(hex_digits,(size_t) GetPixelIndex(
indexes+x),q);
if ((q-pixels+4) >= 80)
{
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((image->matte != MagickFalse) &&
- (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity))
+ (GetPixelOpacity(p) == (Quantum) TransparentOpacity))
{
*q++=ScaleQuantumToChar((Quantum) QuantumRange);
*q++=ScaleQuantumToChar((Quantum) QuantumRange);
else
if (image->colorspace != CMYKColorspace)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
}
else
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetIndexPixelComponent(
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelIndex(
indexes+x));
}
p++;
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((image->matte != MagickFalse) &&
- (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity))
+ (GetPixelOpacity(p) == (Quantum) TransparentOpacity))
{
Ascii85Encode(image,ScaleQuantumToChar((Quantum)
QuantumRange));
if (image->colorspace != CMYKColorspace)
{
Ascii85Encode(image,ScaleQuantumToChar(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
Ascii85Encode(image,ScaleQuantumToChar(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
Ascii85Encode(image,ScaleQuantumToChar(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
}
else
{
Ascii85Encode(image,ScaleQuantumToChar(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
Ascii85Encode(image,ScaleQuantumToChar(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
Ascii85Encode(image,ScaleQuantumToChar(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
Ascii85Encode(image,ScaleQuantumToChar(
- GetIndexPixelComponent(indexes+x)));
+ GetPixelIndex(indexes+x)));
}
p++;
}
break;
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
progress=SetImageProgress(image,SaveImageTag,(MagickOffsetType)
y,image->rows);
if (progress == MagickFalse)
break;
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- Ascii85Encode(image,(unsigned char) GetIndexPixelComponent(
+ Ascii85Encode(image,(unsigned char) GetPixelIndex(
indexes+x));
progress=SetImageProgress(image,SaveImageTag,(MagickOffsetType)
y,image->rows);
if (image->colorspace != CMYKColorspace)
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
else
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetIndexPixelComponent(indexes+x));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelIndex(indexes+x));
p++;
}
if (image->previous == (Image *) NULL)
break;
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
if (image->previous == (Image *) NULL)
{
status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
{
case -1:
{
- SetAlphaPixelComponent(q,pixel);
+ SetPixelAlpha(q,pixel);
break;
}
case 0:
{
- SetRedPixelComponent(q,pixel);
+ SetPixelRed(q,pixel);
if (channels == 1)
{
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
}
if (image->storage_class == PseudoClass)
{
if (packet_size == 1)
- SetIndexPixelComponent(indexes+x,ScaleQuantumToChar(pixel));
+ SetPixelIndex(indexes+x,ScaleQuantumToChar(pixel));
else
- SetIndexPixelComponent(indexes+x,ScaleQuantumToShort(pixel));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelIndex(indexes+x,ScaleQuantumToShort(pixel));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
if (image->depth == 1)
{
ssize_t
number_bits=8;
for (bit=0; bit < number_bits; bit++)
{
- SetIndexPixelComponent(indexes+x,(((unsigned char) pixel) &
+ SetPixelIndex(indexes+x,(((unsigned char) pixel) &
(0x01 << (7-bit))) != 0 ? 0 : 255);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
q++;
x++;
}
case 1:
{
if (image->storage_class == PseudoClass)
- SetAlphaPixelComponent(q,pixel);
+ SetPixelAlpha(q,pixel);
else
- SetGreenPixelComponent(q,pixel);
+ SetPixelGreen(q,pixel);
break;
}
case 2:
{
if (image->storage_class == PseudoClass)
- SetAlphaPixelComponent(q,pixel);
+ SetPixelAlpha(q,pixel);
else
- SetBluePixelComponent(q,pixel);
+ SetPixelBlue(q,pixel);
break;
}
case 3:
{
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(indexes+x,pixel);
+ SetPixelIndex(indexes+x,pixel);
else
- SetAlphaPixelComponent(q,pixel);
+ SetPixelAlpha(q,pixel);
break;
}
case 4:
{
if ((image->colorspace == RGBColorspace) && (channels > 3))
break;
- SetAlphaPixelComponent(q,pixel);
+ SetPixelAlpha(q,pixel);
break;
}
default:
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
{
case RedQuantum:
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
break;
}
case GreenQuantum:
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
break;
}
case BlueQuantum:
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
break;
}
case AlphaQuantum:
{
- SetAlphaPixelComponent(q,GetAlphaPixelComponent(p));
+ SetPixelAlpha(q,GetPixelAlpha(p));
break;
}
default:
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
{
case 0:
{
- SetRedPixelComponent(q,ScaleCharToQuantum(byte));
+ SetPixelRed(q,ScaleCharToQuantum(byte));
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleCharToQuantum(byte));
+ SetPixelGreen(q,ScaleCharToQuantum(byte));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleCharToQuantum(byte));
+ SetPixelBlue(q,ScaleCharToQuantum(byte));
break;
}
case 3:
default:
{
- SetAlphaPixelComponent(q,ScaleCharToQuantum(byte));
+ SetPixelAlpha(q,ScaleCharToQuantum(byte));
break;
}
}
{
case 0:
{
- SetRedPixelComponent(q,ScaleCharToQuantum(byte));
+ SetPixelRed(q,ScaleCharToQuantum(byte));
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleCharToQuantum(byte));
+ SetPixelGreen(q,ScaleCharToQuantum(byte));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleCharToQuantum(byte));
+ SetPixelBlue(q,ScaleCharToQuantum(byte));
break;
}
case 3:
default:
{
- SetAlphaPixelComponent(q,ScaleCharToQuantum(byte));
+ SetPixelAlpha(q,ScaleCharToQuantum(byte));
break;
}
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelAlpha(q,ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,*p++);
+ SetPixelIndex(indexes+x,*p++);
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
if (image->previous == (Image *) NULL)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,image->colormap[*p++].red);
- SetGreenPixelComponent(q,image->colormap[*p++].green);
- SetBluePixelComponent(q,image->colormap[*p++].blue);
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,image->colormap[*p++].red);
+ SetPixelGreen(q,image->colormap[*p++].green);
+ SetPixelBlue(q,image->colormap[*p++].blue);
+ SetPixelAlpha(q,ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
if(binar[z])
{
- SetRedPixelComponent(q,ScaleCharToQuantum(
+ SetPixelRed(q,ScaleCharToQuantum(
colour_palette[3*ink]));
- SetGreenPixelComponent(q,ScaleCharToQuantum(
+ SetPixelGreen(q,ScaleCharToQuantum(
colour_palette[1+(3*ink)]));
- SetBluePixelComponent(q,ScaleCharToQuantum(
+ SetPixelBlue(q,ScaleCharToQuantum(
colour_palette[2+(3*ink)]));
} else {
- SetRedPixelComponent(q,ScaleCharToQuantum(
+ SetPixelRed(q,ScaleCharToQuantum(
colour_palette[3*paper]));
- SetGreenPixelComponent(q,ScaleCharToQuantum(
+ SetPixelGreen(q,ScaleCharToQuantum(
colour_palette[1+(3*paper)]));
- SetBluePixelComponent(q,ScaleCharToQuantum(
+ SetPixelBlue(q,ScaleCharToQuantum(
colour_palette[2+(3*paper)]));
}
{
case 0:
{
- SetRedPixelComponent(q,pixel);
- SetGreenPixelComponent(q,pixel);
- SetBluePixelComponent(q,pixel);
+ SetPixelRed(q,pixel);
+ SetPixelGreen(q,pixel);
+ SetPixelBlue(q,pixel);
break;
}
case 1:
{
- SetGreenPixelComponent(q,pixel);
+ SetPixelGreen(q,pixel);
break;
}
case 2:
{
- SetBluePixelComponent(q,pixel);
+ SetPixelBlue(q,pixel);
break;
}
case 3:
{
if (image->colorspace == CMYKColorspace)
- SetBlackPixelComponent(indexes+x,pixel);
+ SetPixelBlack(indexes+x,pixel);
break;
}
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelRed(q,ScaleShortToQuantum((unsigned short)
((*(p+0) << 8) | (*(p+1)))));
- SetGreenPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelGreen(q,ScaleShortToQuantum((unsigned short)
((*(p+2) << 8) | (*(p+3)))));
- SetBluePixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelBlue(q,ScaleShortToQuantum((unsigned short)
((*(p+4) << 8) | (*(p+5)))));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelAlpha(q,ScaleShortToQuantum((unsigned short)
((*(p+6) << 8) | (*(p+7)))));
p+=8;
q++;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p));
+ SetPixelRed(q,ScaleCharToQuantum(*p));
q->green=ScaleCharToQuantum(*(p+1));
q->blue=ScaleCharToQuantum(*(p+2));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*(p+3)));
+ SetPixelAlpha(q,ScaleCharToQuantum(*(p+3)));
p+=4;
q++;
}
{
quantum=(*p << 8);
quantum|=(*(p+1));
- SetIndexPixelComponent(indexes+x,quantum);
+ SetPixelIndex(indexes+x,quantum);
p+=8;
q++;
}
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetIndexPixelComponent(indexes+x,*p);
+ SetPixelIndex(indexes+x,*p);
p+=4;
q++;
}
q=(unsigned char *) iris_pixels;
q+=((iris_info.rows-1)-y)*(4*iris_info.columns)+4*x;
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetAlphaPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelAlpha(p));
p++;
}
else
q=(unsigned short *) iris_pixels;
q+=((iris_info.rows-1)-y)*(4*iris_info.columns)+4*x;
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
- *q++=ScaleQuantumToShort(GetAlphaPixelComponent(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
+ *q++=ScaleQuantumToShort(GetPixelAlpha(p));
p++;
}
if (image->previous == (Image *) NULL)
{
#define GetBit(alpha,i) MagickMin((((size_t) (alpha) >> (size_t) \
(i)) & 0x01),16)
-#define SetBit(indexes,i,set) SetIndexPixelComponent(indexes,((set) != 0 ? \
- (size_t) GetIndexPixelComponent(indexes) | (one << (size_t) (i)) : (size_t) \
- GetIndexPixelComponent(indexes) & ~(one << (size_t) (i))))
+#define SetBit(indexes,i,set) SetPixelIndex(indexes,((set) != 0 ? \
+ (size_t) GetPixelIndex(indexes) | (one << (size_t) (i)) : (size_t) \
+ GetPixelIndex(indexes) & ~(one << (size_t) (i))))
Image
*image,
for (x=0; x < ((ssize_t) image->columns-7); x+=8)
{
for (bit=7; bit >= 0; bit--)
- SetIndexPixelComponent(indexes+x+7-bit,((*p) & (0x01 << bit) ?
+ SetPixelIndex(indexes+x+7-bit,((*p) & (0x01 << bit) ?
0x00 : 0x01));
p++;
}
if ((image->columns % 8) != 0)
{
for (bit=7; bit >= (ssize_t) (8-(image->columns % 8)); bit--)
- SetIndexPixelComponent(indexes+x+7-bit,(*p) & (0x01 << bit) ?
+ SetPixelIndex(indexes+x+7-bit,(*p) & (0x01 << bit) ?
0x00 : 0x01);
p++;
}
break;
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,*p++);
+ SetPixelIndex(indexes+x,*p++);
if ((image->columns % 2) != 0)
p++;
if (SyncAuthenticPixels(image,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelAlpha(q,ScaleCharToQuantum(*p++));
if (sun_info.type == RT_STANDARD)
{
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
}
else
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
}
if (image->colors != 0)
{
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetRedPixelComponent(q)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetGreenPixelComponent(q)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetBluePixelComponent(q)].blue);
+ SetPixelRed(q,image->colormap[(ssize_t)
+ GetPixelRed(q)].red);
+ SetPixelGreen(q,image->colormap[(ssize_t)
+ GetPixelGreen(q)].green);
+ SetPixelBlue(q,image->colormap[(ssize_t)
+ GetPixelBlue(q)].blue);
}
q++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if (image->matte != MagickFalse)
- *q++=ScaleQuantumToChar(GetAlphaPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelAlpha(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
if (((bytes_per_pixel*image->columns) & 0x01) != 0)
for (x=0; x < (ssize_t) image->columns; x++)
{
(void) WriteBlobByte(image,(unsigned char)
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
p++;
}
if (image->columns & 0x01)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- trace->bitmap[i++]=GetRedPixelComponent(p);
+ trace->bitmap[i++]=GetPixelRed(p);
if (number_planes == 3)
{
- trace->bitmap[i++]=GetGreenPixelComponent(p);
- trace->bitmap[i++]=GetBluePixelComponent(p);
+ trace->bitmap[i++]=GetPixelGreen(p);
+ trace->bitmap[i++]=GetPixelBlue(p);
}
p++;
}
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
if (image->storage_class == PseudoClass)
- SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,pixel.red);
- SetGreenPixelComponent(q,pixel.green);
- SetBluePixelComponent(q,pixel.blue);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRed(q,pixel.red);
+ SetPixelGreen(q,pixel.green);
+ SetPixelBlue(q,pixel.blue);
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,pixel.opacity);
+ SetPixelOpacity(q,pixel.opacity);
q++;
}
if (((unsigned char) (tga_info.attributes & 0xc0) >> 6) == 4)
for (x=0; x < (ssize_t) image->columns; x++)
{
if (targa_info.image_type == TargaColormap)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
else
if (targa_info.image_type == TargaMonochrome)
*q++=(unsigned char) ScaleQuantumToChar(PixelIntensityToQuantum(p));
else
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
if (image->matte != MagickFalse)
*q++=(unsigned char) ScaleQuantumToChar(
- GetAlphaPixelComponent(p));
+ GetPixelAlpha(p));
if (image->colorspace == CMYKColorspace)
- *q++=ScaleQuantumToChar(GetIndexPixelComponent(indexes+x));
+ *q++=ScaleQuantumToChar(GetPixelIndex(indexes+x));
}
p++;
}
p=(unsigned char *) (((uint32 *) pixels)+image->columns*i);
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelRed(q,ScaleCharToQuantum((unsigned char)
(TIFFGetR(*p))));
- SetGreenPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelGreen(q,ScaleCharToQuantum((unsigned char)
(TIFFGetG(*p))));
- SetBluePixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelBlue(q,ScaleCharToQuantum((unsigned char)
(TIFFGetB(*p))));
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelOpacity(q,ScaleCharToQuantum((unsigned char)
(TIFFGetA(*p))));
p++;
q++;
if (image->matte != MagickFalse)
for (column=columns_remaining; column > 0; column--)
{
- SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelRed(q,ScaleCharToQuantum((unsigned char)
TIFFGetR(*p)));
- SetGreenPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelGreen(q,ScaleCharToQuantum((unsigned char)
TIFFGetG(*p)));
- SetBluePixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelBlue(q,ScaleCharToQuantum((unsigned char)
TIFFGetB(*p)));
- SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelAlpha(q,ScaleCharToQuantum((unsigned char)
TIFFGetA(*p)));
q++;
p++;
else
for (column=columns_remaining; column > 0; column--)
{
- SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelRed(q,ScaleCharToQuantum((unsigned char)
TIFFGetR(*p)));
- SetGreenPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelGreen(q,ScaleCharToQuantum((unsigned char)
TIFFGetG(*p)));
- SetBluePixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelBlue(q,ScaleCharToQuantum((unsigned char)
TIFFGetB(*p)));
q++;
p++;
q+=image->columns-1;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelRed(q,ScaleCharToQuantum((unsigned char)
TIFFGetR(*p)));
- SetGreenPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelGreen(q,ScaleCharToQuantum((unsigned char)
TIFFGetG(*p)));
- SetBluePixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelBlue(q,ScaleCharToQuantum((unsigned char)
TIFFGetB(*p)));
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelAlpha(q,ScaleCharToQuantum((unsigned char)
TIFFGetA(*p)));
p--;
q--;
p=tim_pixels+y*bytes_per_line;
for (x=0; x < ((ssize_t) image->columns-1); x+=2)
{
- SetIndexPixelComponent(indexes+x,(*p) & 0x0f);
- SetIndexPixelComponent(indexes+x+1,(*p >> 4) & 0x0f);
+ SetPixelIndex(indexes+x,(*p) & 0x0f);
+ SetPixelIndex(indexes+x+1,(*p >> 4) & 0x0f);
p++;
}
if ((image->columns % 2) != 0)
{
- SetIndexPixelComponent(indexes+x,(*p >> 4) & 0x0f);
+ SetPixelIndex(indexes+x,(*p >> 4) & 0x0f);
p++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
indexes=GetAuthenticIndexQueue(image);
p=tim_pixels+y*bytes_per_line;
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,*p++);
+ SetPixelIndex(indexes+x,*p++);
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
if (image->previous == (Image *) NULL)
{
word=(*p++);
word|=(*p++ << 8);
- SetBluePixelComponent(q,ScaleCharToQuantum(ScaleColor5to8(
+ SetPixelBlue(q,ScaleCharToQuantum(ScaleColor5to8(
(1UL*word >> 10) & 0x1f)));
- SetGreenPixelComponent(q,ScaleCharToQuantum(ScaleColor5to8(
+ SetPixelGreen(q,ScaleCharToQuantum(ScaleColor5to8(
(1UL*word >> 5) & 0x1f)));
- SetRedPixelComponent(q,ScaleCharToQuantum(ScaleColor5to8(
+ SetPixelRed(q,ScaleCharToQuantum(ScaleColor5to8(
(1UL*word >> 0) & 0x1f)));
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
q=GetAuthenticPixels(image,x_offset,y_offset,1,1,exception);
if (q == (PixelPacket *) NULL)
continue;
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel.red,range));
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel.green,range));
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel.blue,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel.red,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel.green,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel.blue,range));
if (image->colorspace == CMYKColorspace)
{
indexes=GetAuthenticIndexQueue(image);
- SetIndexPixelComponent(indexes,ScaleAnyToQuantum(pixel.index,
+ SetPixelIndex(indexes,ScaleAnyToQuantum(pixel.index,
range));
}
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ScaleAnyToQuantum(pixel.opacity,range));
+ SetPixelAlpha(q,ScaleAnyToQuantum(pixel.opacity,range));
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- matte_image[i]=(unsigned char) (GetOpacityPixelComponent(p) ==
+ matte_image[i]=(unsigned char) (GetPixelOpacity(p) ==
(Quantum) TransparentOpacity ? 1 : 0);
if (matte_image[i] != 0)
transparent=MagickTrue;
for (x=0; x < (ssize_t) image->columns; x++)
{
if (matte_image[i] != 0)
- SetIndexPixelComponent(indexes+x,image->colors);
+ SetPixelIndex(indexes+x,image->colors);
p++;
}
}
(void) WriteBlobString(image," \"");
for (x=0; x < (ssize_t) image->columns; x++)
{
- k=((ssize_t) GetIndexPixelComponent(indexes+x) % MaxCixels);
+ k=((ssize_t) GetPixelIndex(indexes+x) % MaxCixels);
symbol[0]=Cixel[k];
for (j=1; j < (int) characters_per_pixel; j++)
{
- k=(((int) GetIndexPixelComponent(indexes+x)-k)/MaxCixels) % MaxCixels;
+ k=(((int) GetPixelIndex(indexes+x)-k)/MaxCixels) % MaxCixels;
symbol[j]=Cixel[k];
}
symbol[j]='\0';
y1=(unsigned char) ReadBlobByte(image);
v=(unsigned char) ReadBlobByte(image);
y2=(unsigned char) ReadBlobByte(image);
- SetRedPixelComponent(q,ScaleCharToQuantum(y1));
- SetGreenPixelComponent(q,ScaleCharToQuantum(u));
- SetBluePixelComponent(q,ScaleCharToQuantum(v));
+ SetPixelRed(q,ScaleCharToQuantum(y1));
+ SetPixelGreen(q,ScaleCharToQuantum(u));
+ SetPixelBlue(q,ScaleCharToQuantum(v));
q++;
- SetRedPixelComponent(q,ScaleCharToQuantum(y2));
- SetGreenPixelComponent(q,ScaleCharToQuantum(u));
- SetBluePixelComponent(q,ScaleCharToQuantum(v));
+ SetPixelRed(q,ScaleCharToQuantum(y2));
+ SetPixelGreen(q,ScaleCharToQuantum(u));
+ SetPixelBlue(q,ScaleCharToQuantum(v));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
{
if (full != MagickFalse)
{
- pixel.green=(pixel.green+GetGreenPixelComponent(p))/2;
- pixel.blue=(pixel.blue+GetBluePixelComponent(p))/2;
+ pixel.green=(pixel.green+GetPixelGreen(p))/2;
+ pixel.blue=(pixel.blue+GetPixelBlue(p))/2;
(void) WriteBlobByte(image,ScaleQuantumToChar((Quantum) pixel.green));
(void) WriteBlobByte(image,ScaleQuantumToChar((Quantum) pixel.red));
(void) WriteBlobByte(image,ScaleQuantumToChar((Quantum) pixel.blue));
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
}
- pixel.red=(double) GetRedPixelComponent(p);
- pixel.green=(double) GetGreenPixelComponent(p);
- pixel.blue=(double) GetBluePixelComponent(p);
+ pixel.red=(double) GetPixelRed(p);
+ pixel.green=(double) GetPixelGreen(p);
+ pixel.blue=(double) GetPixelBlue(p);
full=full == MagickFalse ? MagickTrue : MagickFalse;
p++;
}
for (bit=0; bit < 8; bit++)
if (PixelIntensity(q) < ((MagickRealType) QuantumRange/2.0))
{
- quantum=(size_t) GetIndexPixelComponent(indexes+x+bit);
+ quantum=(size_t) GetPixelIndex(indexes+x+bit);
quantum|=0x01;
- SetIndexPixelComponent(indexes+x+bit,quantum);
+ SetPixelIndex(indexes+x+bit,quantum);
}
p++;
}
for (bit=0; bit < (ssize_t) (image->columns % 8); bit++)
if (PixelIntensity(q) < ((MagickRealType) QuantumRange/2.0))
{
- quantum=(size_t) GetIndexPixelComponent(indexes+x+bit);
+ quantum=(size_t) GetPixelIndex(indexes+x+bit);
quantum|=0x01;
- SetIndexPixelComponent(indexes+x+bit,quantum);
+ SetPixelIndex(indexes+x+bit,quantum);
}
p++;
}
break;
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,*p++);
+ SetPixelIndex(indexes+x,*p++);
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
if (image->previous == (Image *) NULL)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*(p+number_pixels)));
- SetBluePixelComponent(q,ScaleCharToQuantum(*(p+2*number_pixels)));
+ SetPixelRed(q,ScaleCharToQuantum(*p));
+ SetPixelGreen(q,ScaleCharToQuantum(*(p+number_pixels)));
+ SetPixelBlue(q,ScaleCharToQuantum(*(p+2*number_pixels)));
if (image->colors != 0)
{
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetRedPixelComponent(q)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetGreenPixelComponent(q)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetBluePixelComponent(q)].blue);
+ SetPixelRed(q,image->colormap[(ssize_t)
+ GetPixelRed(q)].red);
+ SetPixelGreen(q,image->colormap[(ssize_t)
+ GetPixelGreen(q)].green);
+ SetPixelBlue(q,image->colormap[(ssize_t)
+ GetPixelBlue(q)].blue);
}
- SetOpacityPixelComponent(q,image->matte != MagickFalse ?
+ SetPixelOpacity(q,image->matte != MagickFalse ?
QuantumRange-ScaleCharToQuantum(*(p+number_pixels*3)) :
OpaqueOpacity);
p++;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q=ScaleQuantumToChar(GetRedPixelComponent(p));
- *(q+number_pixels)=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *(q+number_pixels*2)=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q=ScaleQuantumToChar(GetPixelRed(p));
+ *(q+number_pixels)=ScaleQuantumToChar(GetPixelGreen(p));
+ *(q+number_pixels*2)=ScaleQuantumToChar(GetPixelBlue(p));
if (image->matte != MagickFalse)
*(q+number_pixels*3)=ScaleQuantumToChar((Quantum)
- (GetAlphaPixelComponent(p)));
+ (GetPixelAlpha(p)));
p++;
q++;
}
break;
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
if (image->previous == (Image *) NULL)
{
status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
if (byte == EOF)
ThrowReaderException(CorruptImageError,"CorruptImage");
}
- SetIndexPixelComponent(indexes+x,(byte & (0x01 << (7-bit))) ? 1 : 0);
+ SetPixelIndex(indexes+x,(byte & (0x01 << (7-bit))) ? 1 : 0);
bit++;
if (bit == 8)
bit=0;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelAlpha(q,ScaleCharToQuantum(*p++));
if (q->opacity != OpaqueOpacity)
image->matte=MagickTrue;
q++;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
if (image->matte != MagickFalse)
*q++=ScaleQuantumToChar((Quantum) (QuantumRange-
- (image->matte != MagickFalse ? GetOpacityPixelComponent(p) :
+ (image->matte != MagickFalse ? GetPixelOpacity(p) :
OpaqueOpacity)));
p++;
}
for (bit=0; bit < 8; bit++)
{
index=((*p) & (0x80 >> bit) ? 0x01 : 0x00);
- SetIndexPixelComponent(indexes+x+bit,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x+bit,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
p++;
for (bit=0; bit < (ssize_t) (image->columns % 8); bit++)
{
index=((*p) & (0x80 >> bit) ? 0x01 : 0x00);
- SetIndexPixelComponent(indexes+x+bit,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x+bit,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
p++;
for (x=0; x < ((ssize_t) image->columns-1); x+=2)
{
index=ConstrainColormapIndex(image,(*p >> 6) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
index=ConstrainColormapIndex(image,(*p >> 4) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
index=ConstrainColormapIndex(image,(*p >> 2) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
index=ConstrainColormapIndex(image,(*p) & 0x3);
- SetIndexPixelComponent(indexes+x+1,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x+1,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
p++;
q++;
}
if ((image->columns % 4) != 0)
{
index=ConstrainColormapIndex(image,(*p >> 6) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
if ((image->columns % 4) >= 1)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
if ((image->columns % 4) >= 2)
{
index=ConstrainColormapIndex(image,(*p >> 2) & 0x3);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
}
for (x=0; x < ((ssize_t) image->columns-1); x+=2)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
index=ConstrainColormapIndex(image,(*p) & 0x0f);
- SetIndexPixelComponent(indexes+x+1,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x+1,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
p++;
q++;
}
if ((image->columns % 2) != 0)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
p++;
q++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
index=ConstrainColormapIndex(image,*p);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
q++;
}
if (!SyncAuthenticPixels(image,exception))
{
if (bit == 0)
byte=(size_t) (*p++);
- SetIndexPixelComponent(indexes+x,(byte & 0x01) != 0 ? 0x01 : 0x00);
+ SetPixelIndex(indexes+x,(byte & 0x01) != 0 ? 0x01 : 0x00);
bit++;
byte>>=1;
if (bit == 8)
{
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
{
for (x=0; x < (ssize_t) tile_image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*graydata));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ SetPixelRed(q,ScaleCharToQuantum(*graydata));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelAlpha(q,ScaleCharToQuantum((unsigned char)
inLayerInfo->opacity));
graydata++;
q++;
{
for (x=0; x < (ssize_t) tile_image->columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(xcfdata->red));
- SetGreenPixelComponent(q,ScaleCharToQuantum(xcfdata->green));
- SetBluePixelComponent(q,ScaleCharToQuantum(xcfdata->blue));
- SetAlphaPixelComponent(q,xcfdata->opacity == 0U ? OpaqueOpacity :
+ SetPixelRed(q,ScaleCharToQuantum(xcfdata->red));
+ SetPixelGreen(q,ScaleCharToQuantum(xcfdata->green));
+ SetPixelBlue(q,ScaleCharToQuantum(xcfdata->blue));
+ SetPixelAlpha(q,xcfdata->opacity == 0U ? OpaqueOpacity :
ScaleCharToQuantum((unsigned char) inLayerInfo->opacity));
xcfdata++;
q++;
{
case 0:
{
- SetRedPixelComponent(q,ScaleCharToQuantum(data));
+ SetPixelRed(q,ScaleCharToQuantum(data));
if (inDocInfo->image_type == GIMP_GRAY)
{
- SetGreenPixelComponent(q,ScaleCharToQuantum(data));
- SetBluePixelComponent(q,ScaleCharToQuantum(data));
- SetAlphaPixelComponent(q,ScaleCharToQuantum(
+ SetPixelGreen(q,ScaleCharToQuantum(data));
+ SetPixelBlue(q,ScaleCharToQuantum(data));
+ SetPixelAlpha(q,ScaleCharToQuantum(
(unsigned char) inLayerInfo->opacity));
}
else
{
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetAlphaPixelComponent(q,ScaleCharToQuantum(
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelAlpha(q,ScaleCharToQuantum(
(unsigned char) inLayerInfo->opacity));
}
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleCharToQuantum(data));
+ SetPixelGreen(q,ScaleCharToQuantum(data));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleCharToQuantum(data));
+ SetPixelBlue(q,ScaleCharToQuantum(data));
break;
}
case 3:
{
- SetAlphaPixelComponent(q,data == 0 ? OpaqueOpacity :
+ SetPixelAlpha(q,data == 0 ? OpaqueOpacity :
ScaleCharToQuantum((unsigned char) inLayerInfo->opacity));
break;
}
{
case 0:
{
- SetRedPixelComponent(q,ScaleCharToQuantum(data));
+ SetPixelRed(q,ScaleCharToQuantum(data));
if (inDocInfo->image_type == GIMP_GRAY)
{
- SetGreenPixelComponent(q,ScaleCharToQuantum(data));
- SetBluePixelComponent(q,ScaleCharToQuantum(data));
- SetAlphaPixelComponent(q,ScaleCharToQuantum(
+ SetPixelGreen(q,ScaleCharToQuantum(data));
+ SetPixelBlue(q,ScaleCharToQuantum(data));
+ SetPixelAlpha(q,ScaleCharToQuantum(
(unsigned char) inLayerInfo->opacity));
}
else
{
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetAlphaPixelComponent(q,ScaleCharToQuantum(
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelAlpha(q,ScaleCharToQuantum(
(unsigned char) inLayerInfo->opacity));
}
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleCharToQuantum(data));
+ SetPixelGreen(q,ScaleCharToQuantum(data));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleCharToQuantum(data));
+ SetPixelBlue(q,ScaleCharToQuantum(data));
break;
}
case 3:
{
- SetAlphaPixelComponent(q,data == 0 ? OpaqueOpacity :
+ SetPixelAlpha(q,data == 0 ? OpaqueOpacity :
ScaleCharToQuantum((unsigned char) inLayerInfo->opacity));
break;
}
(void) CopyXPMColor(key,p,(size_t) width);
j=(ssize_t) GetValueFromSplayTree(xpm_colors,key);
if (image->storage_class == PseudoClass)
- SetIndexPixelComponent(indexes+x,j);
+ SetPixelIndex(indexes+x,j);
*r=image->colormap[j];
r++;
p+=width;
if (q->opacity == (Quantum) TransparentOpacity)
transparent=MagickTrue;
else
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
if (SyncAuthenticPixels(picon,exception) == MagickFalse)
for (x=0; x < (ssize_t) picon->columns; x++)
{
if (q->opacity == (Quantum) TransparentOpacity)
- SetIndexPixelComponent(indexes+x,picon->colors);
+ SetPixelIndex(indexes+x,picon->colors);
q++;
}
if (SyncAuthenticPixels(picon,exception) == MagickFalse)
(void) WriteBlobString(image,"\"");
for (x=0; x < (ssize_t) picon->columns; x++)
{
- k=((ssize_t) GetIndexPixelComponent(indexes+x) % MaxCixels);
+ k=((ssize_t) GetPixelIndex(indexes+x) % MaxCixels);
symbol[0]=Cixel[k];
for (j=1; j < (ssize_t) characters_per_pixel; j++)
{
- k=(((int) GetIndexPixelComponent(indexes+x)-k)/MaxCixels) % MaxCixels;
+ k=(((int) GetPixelIndex(indexes+x)-k)/MaxCixels) % MaxCixels;
symbol[j]=Cixel[k];
}
symbol[j]='\0';
(void) WriteBlobString(image,"\"");
for (x=0; x < (ssize_t) image->columns; x++)
{
- k=((ssize_t) GetIndexPixelComponent(indexes+x) % MaxCixels);
+ k=((ssize_t) GetPixelIndex(indexes+x) % MaxCixels);
symbol[0]=Cixel[k];
for (j=1; j < (ssize_t) characters_per_pixel; j++)
{
- k=(((int) GetIndexPixelComponent(indexes+x)-k)/MaxCixels) % MaxCixels;
+ k=(((int) GetPixelIndex(indexes+x)-k)/MaxCixels) % MaxCixels;
symbol[j]=Cixel[k];
}
symbol[j]='\0';
{
pixel=XGetPixel(ximage,(int) x,(int) y);
index=(IndexPacket) ((pixel >> red_shift) & red_mask);
- SetRedPixelComponent(q,ScaleShortToQuantum(colors[(ssize_t)
+ SetPixelRed(q,ScaleShortToQuantum(colors[(ssize_t)
index].red));
index=(IndexPacket) ((pixel >> green_shift) & green_mask);
- SetGreenPixelComponent(q,ScaleShortToQuantum(colors[(ssize_t)
+ SetPixelGreen(q,ScaleShortToQuantum(colors[(ssize_t)
index].green));
index=(IndexPacket) ((pixel >> blue_shift) & blue_mask);
- SetBluePixelComponent(q,ScaleShortToQuantum(colors[(ssize_t)
+ SetPixelBlue(q,ScaleShortToQuantum(colors[(ssize_t)
index].blue));
q++;
}
pixel=XGetPixel(ximage,(int) x,(int) y);
color=(pixel >> red_shift) & red_mask;
color=(color*65535UL)/red_mask;
- SetRedPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelRed(q,ScaleShortToQuantum((unsigned short)
color));
color=(pixel >> green_shift) & green_mask;
color=(color*65535UL)/green_mask;
- SetGreenPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelGreen(q,ScaleShortToQuantum((unsigned short)
color));
color=(pixel >> blue_shift) & blue_mask;
color=(color*65535UL)/blue_mask;
- SetBluePixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelBlue(q,ScaleShortToQuantum((unsigned short)
color));
q++;
}
{
index=ConstrainColormapIndex(image,XGetPixel(ximage,(int) x,
(int) y));
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
{
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- *q++=(unsigned char) GetIndexPixelComponent(indexes+x);
+ *q++=(unsigned char) GetPixelIndex(indexes+x);
}
else
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
for (x=0; x < (ssize_t) scanline_pad; x++)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
{
case RedQuantum:
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
break;
}
case GreenQuantum:
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
break;
}
case BlueQuantum:
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
break;
}
default:
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x+=2)
{
- SetRedPixelComponent(chroma_pixels,0);
+ SetPixelRed(chroma_pixels,0);
if (quantum == 1)
- SetGreenPixelComponent(chroma_pixels,ScaleCharToQuantum(*p++));
+ SetPixelGreen(chroma_pixels,ScaleCharToQuantum(*p++));
else
{
- SetGreenPixelComponent(chroma_pixels,ScaleShortToQuantum(
+ SetPixelGreen(chroma_pixels,ScaleShortToQuantum(
((*p) << 8) | *(p+1)));
p+=2;
}
if (quantum == 1)
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
else
{
- SetRedPixelComponent(q,ScaleShortToQuantum(((*p) << 8) |
+ SetPixelRed(q,ScaleShortToQuantum(((*p) << 8) |
*(p+1)));
p+=2;
}
- SetGreenPixelComponent(q,0);
- SetBluePixelComponent(q,0);
+ SetPixelGreen(q,0);
+ SetPixelBlue(q,0);
q++;
- SetGreenPixelComponent(q,0);
- SetBluePixelComponent(q,0);
+ SetPixelGreen(q,0);
+ SetPixelBlue(q,0);
if (quantum == 1)
- SetBluePixelComponent(chroma_pixels,ScaleCharToQuantum(*p++));
+ SetPixelBlue(chroma_pixels,ScaleCharToQuantum(*p++));
else
{
- SetBluePixelComponent(chroma_pixels,ScaleShortToQuantum(
+ SetPixelBlue(chroma_pixels,ScaleShortToQuantum(
((*p) << 8) | *(p+1)));
p+=2;
}
if (quantum == 1)
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
else
{
- SetRedPixelComponent(q,ScaleShortToQuantum(((*p) << 8) |
+ SetPixelRed(q,ScaleShortToQuantum(((*p) << 8) |
*(p+1)));
p+=2;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if (quantum == 1)
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
else
{
- SetRedPixelComponent(q,ScaleShortToQuantum(((*p) << 8) |
+ SetPixelRed(q,ScaleShortToQuantum(((*p) << 8) |
*(p+1)));
p+=2;
}
- SetGreenPixelComponent(q,0);
- SetBluePixelComponent(q,0);
+ SetPixelGreen(q,0);
+ SetPixelBlue(q,0);
q++;
}
}
break;
for (x=0; x < (ssize_t) chroma_image->columns; x++)
{
- SetRedPixelComponent(q,0);
+ SetPixelRed(q,0);
if (quantum == 1)
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
else
{
- SetGreenPixelComponent(q,ScaleShortToQuantum(((*p) << 8) |
+ SetPixelGreen(q,ScaleShortToQuantum(((*p) << 8) |
*(p+1)));
p+=2;
}
- SetBluePixelComponent(q,0);
+ SetPixelBlue(q,0);
q++;
}
if (SyncAuthenticPixels(chroma_image,exception) == MagickFalse)
for (x=0; x < (ssize_t) chroma_image->columns; x++)
{
if (quantum == 1)
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
else
{
- SetBluePixelComponent(q,ScaleShortToQuantum(((*p) << 8) |
+ SetPixelBlue(q,ScaleShortToQuantum(((*p) << 8) |
*(p+1)));
p+=2;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(chroma_pixels));
- SetBluePixelComponent(q,GetBluePixelComponent(chroma_pixels));
+ SetPixelGreen(q,GetPixelGreen(chroma_pixels));
+ SetPixelBlue(q,GetPixelBlue(chroma_pixels));
chroma_pixels++;
q++;
}
if (quantum == 1)
{
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetGreenPixelComponent(s)));
+ GetPixelGreen(s)));
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
p++;
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetBluePixelComponent(s)));
+ GetPixelBlue(s)));
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
}
else
{
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetGreenPixelComponent(s)));
+ GetPixelGreen(s)));
(void) WriteBlobShort(image,ScaleQuantumToShort(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
p++;
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetBluePixelComponent(s)));
+ GetPixelBlue(s)));
(void) WriteBlobShort(image,ScaleQuantumToShort(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
}
p++;
s++;
{
if (quantum == 1)
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
else
(void) WriteBlobShort(image,ScaleQuantumToShort(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
p++;
}
if (image->previous == (Image *) NULL)
{
if (quantum == 1)
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
else
(void) WriteBlobShort(image,ScaleQuantumToShort(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
p++;
}
}
{
if (quantum == 1)
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
else
(void) WriteBlobShort(image,ScaleQuantumToShort(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
p++;
}
}
<configure name="LIB_VERSION" value="0x670"/>
<configure name="LIB_VERSION_NUMBER" value="6,7,0,9"/>
<configure name="SVN_REVISION" value="4615" />
- <configure name="RELEASE_DATE" value="2011-06-15"/>
+ <configure name="RELEASE_DATE" value="2011-06-25"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- ConvertRGBToHSB(GetRedPixelComponent(p),GetGreenPixelComponent(p),GetBluePixelComponent(p),&hue,&saturation,&brightness);
+ ConvertRGBToHSB(GetPixelRed(p),GetPixelGreen(p),GetPixelBlue(p),&hue,&saturation,&brightness);
brightness*=QuantumRange;
brightness_sum_x+=brightness;
brightness_sum_x2+=brightness*brightness;
for (x=0; x < (ssize_t) annotate_image->columns; x++)
{
(void) GetFillColor(draw_info,x,y,&fill_color);
- SetAlphaPixelComponent(q,ClampToQuantum((((QuantumRange-
+ SetPixelAlpha(q,ClampToQuantum((((QuantumRange-
(MagickRealType) PixelIntensityToQuantum(q))*(QuantumRange-
fill_color.opacity))/QuantumRange)));
- SetRedPixelComponent(q,fill_color.red);
- SetGreenPixelComponent(q,fill_color.green);
- SetBluePixelComponent(q,fill_color.blue);
+ SetPixelRed(q,fill_color.red);
+ SetPixelGreen(q,fill_color.green);
+ SetPixelBlue(q,fill_color.blue);
q++;
}
sync=SyncCacheViewAuthenticPixels(annotate_view,exception);
status=0;
range=GetQuantumRange(current_depth[id]);
if ((channel & RedChannel) != 0)
- status|=GetRedPixelComponent(p) != ScaleAnyToQuantum(ScaleQuantumToAny(GetRedPixelComponent(p),
+ status|=GetPixelRed(p) != ScaleAnyToQuantum(ScaleQuantumToAny(GetPixelRed(p),
range),range);
if ((channel & GreenChannel) != 0)
- status|=GetGreenPixelComponent(p) != ScaleAnyToQuantum(ScaleQuantumToAny(GetGreenPixelComponent(p),
+ status|=GetPixelGreen(p) != ScaleAnyToQuantum(ScaleQuantumToAny(GetPixelGreen(p),
range),range);
if ((channel & BlueChannel) != 0)
- status|=GetBluePixelComponent(p) != ScaleAnyToQuantum(ScaleQuantumToAny(GetBluePixelComponent(p),
+ status|=GetPixelBlue(p) != ScaleAnyToQuantum(ScaleQuantumToAny(GetPixelBlue(p),
range),range);
if (status == 0)
break;
status=0;
range=GetQuantumRange(current_depth[id]);
if ((channel & RedChannel) != 0)
- status|=GetRedPixelComponent(p) != ScaleAnyToQuantum(
- ScaleQuantumToAny(GetRedPixelComponent(p),range),range);
+ status|=GetPixelRed(p) != ScaleAnyToQuantum(
+ ScaleQuantumToAny(GetPixelRed(p),range),range);
if ((channel & GreenChannel) != 0)
- status|=GetGreenPixelComponent(p) != ScaleAnyToQuantum(
- ScaleQuantumToAny(GetGreenPixelComponent(p),range),range);
+ status|=GetPixelGreen(p) != ScaleAnyToQuantum(
+ ScaleQuantumToAny(GetPixelGreen(p),range),range);
if ((channel & BlueChannel) != 0)
- status|=GetBluePixelComponent(p) != ScaleAnyToQuantum(
- ScaleQuantumToAny(GetBluePixelComponent(p),range),range);
+ status|=GetPixelBlue(p) != ScaleAnyToQuantum(
+ ScaleQuantumToAny(GetPixelBlue(p),range),range);
if (((channel & OpacityChannel) != 0) && (image->matte != MagickFalse))
- status|=GetOpacityPixelComponent(p) != ScaleAnyToQuantum(
- ScaleQuantumToAny(GetOpacityPixelComponent(p),range),range);
+ status|=GetPixelOpacity(p) != ScaleAnyToQuantum(
+ ScaleQuantumToAny(GetPixelOpacity(p),range),range);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- status|=GetIndexPixelComponent(indexes+x) !=
- ScaleAnyToQuantum(ScaleQuantumToAny(GetIndexPixelComponent(indexes+
+ status|=GetPixelIndex(indexes+x) !=
+ ScaleAnyToQuantum(ScaleQuantumToAny(GetPixelIndex(indexes+
x),range),range);
if (status == 0)
break;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(p) != OpaqueOpacity)
+ if (GetPixelOpacity(p) != OpaqueOpacity)
break;
p++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ScaleAnyToQuantum(ScaleQuantumToAny(
- GetRedPixelComponent(q),range),range));
+ SetPixelRed(q,ScaleAnyToQuantum(ScaleQuantumToAny(
+ GetPixelRed(q),range),range));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ScaleAnyToQuantum(ScaleQuantumToAny(
- GetGreenPixelComponent(q),range),range));
+ SetPixelGreen(q,ScaleAnyToQuantum(ScaleQuantumToAny(
+ GetPixelGreen(q),range),range));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ScaleAnyToQuantum(ScaleQuantumToAny(
- GetBluePixelComponent(q),range),range));
+ SetPixelBlue(q,ScaleAnyToQuantum(ScaleQuantumToAny(
+ GetPixelBlue(q),range),range));
if (((channel & OpacityChannel) != 0) && (image->matte != MagickFalse))
- SetOpacityPixelComponent(q,ScaleAnyToQuantum(ScaleQuantumToAny(
- GetOpacityPixelComponent(q),range),range));
+ SetPixelOpacity(q,ScaleAnyToQuantum(ScaleQuantumToAny(
+ GetPixelOpacity(q),range),range));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,ScaleAnyToQuantum(ScaleQuantumToAny(
- GetIndexPixelComponent(indexes+x),range),range));
+ SetPixelIndex(indexes+x,ScaleAnyToQuantum(ScaleQuantumToAny(
+ GetPixelIndex(indexes+x),range),range));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
break;
if (PixelIntensityToQuantum(r) > ((Quantum) QuantumRange/2))
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
if (cache_info->active_index_channel != MagickFalse)
- SetIndexPixelComponent(nexus_indexes+i,GetIndexPixelComponent(
+ SetPixelIndex(nexus_indexes+i,GetPixelIndex(
indexes+i));
}
p++;
(GetOneAuthenticPixelFromHandler) NULL)
return(cache_info->methods.get_one_authentic_pixel_from_handler(image,x,y,
pixel,exception));
- *pixel=image->background_color;
pixels=GetAuthenticPixelsCache(image,x,y,1UL,1UL,exception);
if (pixels == (PixelPacket *) NULL)
return(MagickFalse);
{
case BlackVirtualPixelMethod:
{
- SetRedPixelComponent(&virtual_pixel,0);
- SetGreenPixelComponent(&virtual_pixel,0);
- SetBluePixelComponent(&virtual_pixel,0);
- SetOpacityPixelComponent(&virtual_pixel,OpaqueOpacity);
+ SetPixelRed(&virtual_pixel,0);
+ SetPixelGreen(&virtual_pixel,0);
+ SetPixelBlue(&virtual_pixel,0);
+ SetPixelOpacity(&virtual_pixel,OpaqueOpacity);
break;
}
case GrayVirtualPixelMethod:
{
- SetRedPixelComponent(&virtual_pixel,QuantumRange/2);
- SetGreenPixelComponent(&virtual_pixel,QuantumRange/2);
- SetBluePixelComponent(&virtual_pixel,QuantumRange/2);
- SetOpacityPixelComponent(&virtual_pixel,OpaqueOpacity);
+ SetPixelRed(&virtual_pixel,QuantumRange/2);
+ SetPixelGreen(&virtual_pixel,QuantumRange/2);
+ SetPixelBlue(&virtual_pixel,QuantumRange/2);
+ SetPixelOpacity(&virtual_pixel,OpaqueOpacity);
break;
}
case TransparentVirtualPixelMethod:
{
- SetRedPixelComponent(&virtual_pixel,0);
- SetGreenPixelComponent(&virtual_pixel,0);
- SetBluePixelComponent(&virtual_pixel,0);
- SetOpacityPixelComponent(&virtual_pixel,TransparentOpacity);
+ SetPixelRed(&virtual_pixel,0);
+ SetPixelGreen(&virtual_pixel,0);
+ SetPixelBlue(&virtual_pixel,0);
+ SetPixelOpacity(&virtual_pixel,TransparentOpacity);
break;
}
case MaskVirtualPixelMethod:
case WhiteVirtualPixelMethod:
{
- SetRedPixelComponent(&virtual_pixel,QuantumRange);
- SetGreenPixelComponent(&virtual_pixel,QuantumRange);
- SetBluePixelComponent(&virtual_pixel,QuantumRange);
- SetOpacityPixelComponent(&virtual_pixel,OpaqueOpacity);
+ SetPixelRed(&virtual_pixel,QuantumRange);
+ SetPixelGreen(&virtual_pixel,QuantumRange);
+ SetPixelBlue(&virtual_pixel,QuantumRange);
+ SetPixelOpacity(&virtual_pixel,OpaqueOpacity);
break;
}
default:
SetMagickPixelPacket(image,q,nexus_indexes+i,&beta);
MagickPixelCompositeMask(&beta,(MagickRealType) PixelIntensityToQuantum(r),
&alpha,alpha.opacity,&beta);
- SetRedPixelComponent(q,ClampToQuantum(beta.red));
- SetGreenPixelComponent(q,ClampToQuantum(beta.green));
- SetBluePixelComponent(q,ClampToQuantum(beta.blue));
- SetOpacityPixelComponent(q,ClampToQuantum(beta.opacity));
+ SetPixelRed(q,ClampToQuantum(beta.red));
+ SetPixelGreen(q,ClampToQuantum(beta.green));
+ SetPixelBlue(q,ClampToQuantum(beta.blue));
+ SetPixelOpacity(q,ClampToQuantum(beta.opacity));
if (cache_info->active_index_channel != MagickFalse)
- SetIndexPixelComponent(nexus_indexes+i,GetIndexPixelComponent(indexes+i));
+ SetPixelIndex(nexus_indexes+i,GetPixelIndex(indexes+i));
p++;
q++;
r++;
static inline MagickBooleanType IsColorEqual(const PixelPacket *p,
const PixelPacket *q)
{
- if ((GetRedPixelComponent(p) == GetRedPixelComponent(q)) &&
- (GetGreenPixelComponent(p) == GetGreenPixelComponent(q)) &&
- (GetBluePixelComponent(p) == GetBluePixelComponent(q)))
+ if ((GetPixelRed(p) == GetPixelRed(q)) &&
+ (GetPixelGreen(p) == GetPixelGreen(q)) &&
+ (GetPixelBlue(p) == GetPixelBlue(q)))
return(MagickTrue);
return(MagickFalse);
}
static inline MagickBooleanType IsGray(const PixelPacket *pixel)
{
- if ((GetRedPixelComponent(pixel) == GetGreenPixelComponent(pixel)) &&
- (GetGreenPixelComponent(pixel) == GetBluePixelComponent(pixel)))
+ if ((GetPixelRed(pixel) == GetPixelGreen(pixel)) &&
+ (GetPixelGreen(pixel) == GetPixelBlue(pixel)))
return(MagickTrue);
return(MagickFalse);
}
MagickRealType
intensity;
- if ((GetRedPixelComponent(pixel) == GetGreenPixelComponent(pixel)) &&
- (GetGreenPixelComponent(pixel) == GetBluePixelComponent(pixel)))
+ if ((GetPixelRed(pixel) == GetPixelGreen(pixel)) &&
+ (GetPixelGreen(pixel) == GetPixelBlue(pixel)))
return((MagickRealType) pixel->red);
- intensity=(MagickRealType) (0.299*GetRedPixelComponent(pixel)+0.587*
- GetGreenPixelComponent(pixel)+0.114*GetBluePixelComponent(pixel));
+ intensity=(MagickRealType) (0.299*GetPixelRed(pixel)+0.587*
+ GetPixelGreen(pixel)+0.114*GetPixelBlue(pixel));
return(intensity);
}
static inline Quantum PixelIntensityToQuantum(const PixelPacket *pixel)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
- if ((GetRedPixelComponent(pixel) == GetGreenPixelComponent(pixel)) &&
- (GetGreenPixelComponent(pixel) == GetBluePixelComponent(pixel)))
- return(GetRedPixelComponent(pixel));
- return((Quantum) (0.299*GetRedPixelComponent(pixel)+0.587*
- GetGreenPixelComponent(pixel)+0.114*GetBluePixelComponent(pixel)+0.5));
+ if ((GetPixelRed(pixel) == GetPixelGreen(pixel)) &&
+ (GetPixelGreen(pixel) == GetPixelBlue(pixel)))
+ return(GetPixelRed(pixel));
+ return((Quantum) (0.299*GetPixelRed(pixel)+0.587*
+ GetPixelGreen(pixel)+0.114*GetPixelBlue(pixel)+0.5));
#else
{
double
alpha,
beta;
- alpha=GetRedPixelComponent(pixel)-GetGreenPixelComponent(pixel);
- beta=GetGreenPixelComponent(pixel)-GetBluePixelComponent(pixel);
+ alpha=GetPixelRed(pixel)-GetPixelGreen(pixel);
+ beta=GetPixelGreen(pixel)-GetPixelBlue(pixel);
if ((fabs(alpha) <= MagickEpsilon) && (fabs(beta) <= MagickEpsilon))
- return(GetRedPixelComponent(pixel));
- return((Quantum) (0.299*GetRedPixelComponent(pixel)+0.587*
- GetGreenPixelComponent(pixel)+0.114*GetBluePixelComponent(pixel)));
+ return(GetPixelRed(pixel));
+ return((Quantum) (0.299*GetPixelRed(pixel)+0.587*
+ GetPixelGreen(pixel)+0.114*GetPixelBlue(pixel)));
}
#endif
}
/*
Transparencies are involved - set alpha distance
*/
- pixel=(MagickRealType) ((image->matte != MagickFalse ? GetOpacityPixelComponent(p) :
+ pixel=(MagickRealType) ((image->matte != MagickFalse ? GetPixelOpacity(p) :
OpaqueOpacity)-(image->matte != MagickFalse ? q->opacity :
OpaqueOpacity));
distance=pixel*pixel;
Generate a alpha scaling factor to generate a 4D cone on colorspace
Note that if one color is transparent, distance has no color component.
*/
- scale=(QuantumScale*GetAlphaPixelComponent(p));
- scale*=(QuantumScale*GetAlphaPixelComponent(q));
+ scale=(QuantumScale*GetPixelAlpha(p));
+ scale*=(QuantumScale*GetPixelAlpha(q));
if (scale <= MagickEpsilon)
return(MagickTrue);
}
*/
distance*=3.0; /* rescale appropriately */
fuzz*=3.0;
- pixel=(MagickRealType) GetRedPixelComponent(p)-GetRedPixelComponent(q);
+ pixel=(MagickRealType) GetPixelRed(p)-GetPixelRed(q);
if ((image->colorspace == HSLColorspace) ||
(image->colorspace == HSBColorspace) ||
(image->colorspace == HWBColorspace))
distance+=scale*pixel*pixel;
if (distance > fuzz)
return(MagickFalse);
- pixel=(MagickRealType) GetGreenPixelComponent(p)-q->green;
+ pixel=(MagickRealType) GetPixelGreen(p)-q->green;
distance+=scale*pixel*pixel;
if (distance > fuzz)
return(MagickFalse);
- pixel=(MagickRealType) GetBluePixelComponent(p)-q->blue;
+ pixel=(MagickRealType) GetPixelBlue(p)-q->blue;
distance+=scale*pixel*pixel;
if (distance > fuzz)
return(MagickFalse);
/*
Transparencies are involved - set alpha distance.
*/
- pixel=(p->matte != MagickFalse ? GetOpacityPixelComponent(p) :
+ pixel=(p->matte != MagickFalse ? GetPixelOpacity(p) :
OpaqueOpacity)-(q->matte != MagickFalse ? q->opacity : OpaqueOpacity);
distance=pixel*pixel;
if (distance > fuzz)
Note that if one color is transparent, distance has no color component
*/
if (p->matte != MagickFalse)
- scale=(QuantumScale*GetAlphaPixelComponent(p));
+ scale=(QuantumScale*GetPixelAlpha(p));
if (q->matte != MagickFalse)
- scale*=(QuantumScale*GetAlphaPixelComponent(q));
+ scale*=(QuantumScale*GetPixelAlpha(q));
if ( scale <= MagickEpsilon )
return(MagickTrue);
}
distance+=pixel*pixel*scale;
if (distance > fuzz)
return(MagickFalse);
- pixel=GetGreenPixelComponent(p)-q->green;
+ pixel=GetPixelGreen(p)-q->green;
distance+=pixel*pixel*scale;
if (distance > fuzz)
return(MagickFalse);
- pixel=GetBluePixelComponent(p)-q->blue;
+ pixel=GetPixelBlue(p)-q->blue;
distance+=pixel*pixel*scale;
if (distance > fuzz)
return(MagickFalse);
if (image->matte == MagickFalse)
return(MagickTrue);
- if (GetOpacityPixelComponent(p) == q->opacity)
+ if (GetPixelOpacity(p) == q->opacity)
return(MagickTrue);
fuzz=MagickMax(image->fuzz,MagickSQ1_2)*MagickMax(image->fuzz,MagickSQ1_2);
- pixel=(MagickRealType) GetOpacityPixelComponent(p)-(MagickRealType) q->opacity;
+ pixel=(MagickRealType) GetPixelOpacity(p)-(MagickRealType) q->opacity;
distance=pixel*pixel;
if (distance > fuzz)
return(MagickFalse);
color_info->name=(char *) p->name;
GetMagickPixelPacket((Image *) NULL,&color_info->color);
color_info->color.red=(MagickRealType) ScaleCharToQuantum(
- GetRedPixelComponent(p));
+ GetPixelRed(p));
color_info->color.green=(MagickRealType) ScaleCharToQuantum(
- GetGreenPixelComponent(p));
+ GetPixelGreen(p));
color_info->color.blue=(MagickRealType) ScaleCharToQuantum(
- GetBluePixelComponent(p));
+ GetPixelBlue(p));
color_info->color.opacity=(MagickRealType) (QuantumRange-QuantumRange*
p->alpha);
color_info->compliance=(ComplianceType) p->compliance;
pixel;
status=QueryMagickColorCompliance(name,compliance,&pixel,exception);
- SetOpacityPixelComponent(color,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(color,ClampToQuantum(pixel.opacity));
if (pixel.colorspace == CMYKColorspace)
{
- SetRedPixelComponent(color,ClampToQuantum((MagickRealType)
+ SetPixelRed(color,ClampToQuantum((MagickRealType)
(QuantumRange-MagickMin(QuantumRange,(MagickRealType) (QuantumScale*
pixel.red*(QuantumRange-pixel.index)+pixel.index)))));
- SetGreenPixelComponent(color,ClampToQuantum((MagickRealType)
+ SetPixelGreen(color,ClampToQuantum((MagickRealType)
(QuantumRange-MagickMin(QuantumRange,(MagickRealType) (QuantumScale*
pixel.green*(QuantumRange-pixel.index)+pixel.index)))));
- SetBluePixelComponent(color,ClampToQuantum((MagickRealType)
+ SetPixelBlue(color,ClampToQuantum((MagickRealType)
(QuantumRange-MagickMin(QuantumRange,(MagickRealType) (QuantumScale*
pixel.blue*(QuantumRange-pixel.index)+pixel.index)))));
return(status);
}
- SetRedPixelComponent(color,ClampToQuantum(pixel.red));
- SetGreenPixelComponent(color,ClampToQuantum(pixel.green));
- SetBluePixelComponent(color,ClampToQuantum(pixel.blue));
+ SetPixelRed(color,ClampToQuantum(pixel.red));
+ SetPixelGreen(color,ClampToQuantum(pixel.green));
+ SetPixelBlue(color,ClampToQuantum(pixel.blue));
return(status);
}
\f
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- index=(ssize_t) (GetIndexPixelComponent(indexes+x)+displace) %
+ index=(ssize_t) (GetPixelIndex(indexes+x)+displace) %
image->colors;
if (index < 0)
index+=(ssize_t) image->colors;
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- index=(IndexPacket) pixels[(ssize_t) GetIndexPixelComponent(indexes+x)];
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ index=(IndexPacket) pixels[(ssize_t) GetPixelIndex(indexes+x)];
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
- (QuantumRange-GetRedPixelComponent(q))));
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
- (QuantumRange-GetGreenPixelComponent(q))));
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
- (QuantumRange-GetBluePixelComponent(q))));
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
+ (QuantumRange-GetPixelRed(q))));
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
+ (QuantumRange-GetPixelGreen(q))));
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
+ (QuantumRange-GetPixelBlue(q))));
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
brightness=0.0;
for (x=0; x < (ssize_t) image->columns; x++)
{
- ConvertRGBToHSB(GetRedPixelComponent(q),GetGreenPixelComponent(q),
- GetBluePixelComponent(q),&hue,&saturation,&brightness);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ ConvertRGBToHSB(GetPixelRed(q),GetPixelGreen(q),
+ GetPixelBlue(q),&hue,&saturation,&brightness);
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*hue));
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*saturation));
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*brightness));
q++;
}
lightness=0.0;
for (x=0; x < (ssize_t) image->columns; x++)
{
- ConvertRGBToHSL(GetRedPixelComponent(q),GetGreenPixelComponent(q),
- GetBluePixelComponent(q),&hue,&saturation,&lightness);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ ConvertRGBToHSL(GetPixelRed(q),GetPixelGreen(q),
+ GetPixelBlue(q),&hue,&saturation,&lightness);
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*hue));
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*saturation));
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*lightness));
q++;
}
blackness=0.0;
for (x=0; x < (ssize_t) image->columns; x++)
{
- ConvertRGBToHWB(GetRedPixelComponent(q),GetGreenPixelComponent(q),
- GetBluePixelComponent(q),&hue,&whiteness,&blackness);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ ConvertRGBToHWB(GetPixelRed(q),GetPixelGreen(q),
+ GetPixelBlue(q),&hue,&whiteness,&blackness);
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*hue));
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*whiteness));
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*blackness));
q++;
}
Z=0.0;
for (x=0; x < (ssize_t) image->columns; x++)
{
- ConvertRGBToXYZ(GetRedPixelComponent(q),GetGreenPixelComponent(q),
- GetBluePixelComponent(q),&X,&Y,&Z);
+ ConvertRGBToXYZ(GetPixelRed(q),GetPixelGreen(q),
+ GetPixelBlue(q),&X,&Y,&Z);
ConvertXYZToLab(X,Y,Z,&L,&a,&b);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*L));
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*a));
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*b));
q++;
}
}
for (x=(ssize_t) image->columns; x != 0; x--)
{
- SetRedPixelComponent(q,logmap[ScaleQuantumToMap(
- GetRedPixelComponent(q))]);
- SetGreenPixelComponent(q,logmap[ScaleQuantumToMap(
- GetGreenPixelComponent(q))]);
- SetBluePixelComponent(q,logmap[ScaleQuantumToMap(
- GetBluePixelComponent(q))]);
+ SetPixelRed(q,logmap[ScaleQuantumToMap(
+ GetPixelRed(q))]);
+ SetPixelGreen(q,logmap[ScaleQuantumToMap(
+ GetPixelGreen(q))]);
+ SetPixelBlue(q,logmap[ScaleQuantumToMap(
+ GetPixelBlue(q))]);
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- red=ScaleQuantumToMap(GetRedPixelComponent(q));
- green=ScaleQuantumToMap(GetGreenPixelComponent(q));
- blue=ScaleQuantumToMap(GetBluePixelComponent(q));
+ red=ScaleQuantumToMap(GetPixelRed(q));
+ green=ScaleQuantumToMap(GetPixelGreen(q));
+ blue=ScaleQuantumToMap(GetPixelBlue(q));
pixel.red=(x_map[red].x+y_map[green].x+z_map[blue].x)+
(MagickRealType) primary_info.x;
pixel.green=(x_map[red].y+y_map[green].y+z_map[blue].y)+
(MagickRealType) primary_info.y;
pixel.blue=(x_map[red].z+y_map[green].z+z_map[blue].z)+
(MagickRealType) primary_info.z;
- SetRedPixelComponent(q,ScaleMapToQuantum(pixel.red));
- SetGreenPixelComponent(q,ScaleMapToQuantum(pixel.green));
- SetBluePixelComponent(q,ScaleMapToQuantum(pixel.blue));
+ SetPixelRed(q,ScaleMapToQuantum(pixel.red));
+ SetPixelGreen(q,ScaleMapToQuantum(pixel.green));
+ SetPixelBlue(q,ScaleMapToQuantum(pixel.blue));
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
- (QuantumRange-GetRedPixelComponent(q))));
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
- (QuantumRange-GetGreenPixelComponent(q))));
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
- (QuantumRange-GetBluePixelComponent(q))));
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
+ (QuantumRange-GetPixelRed(q))));
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
+ (QuantumRange-GetPixelGreen(q))));
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
+ (QuantumRange-GetPixelBlue(q))));
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
green,
red;
- hue=(double) (QuantumScale*GetRedPixelComponent(q));
- saturation=(double) (QuantumScale*GetGreenPixelComponent(q));
- brightness=(double) (QuantumScale*GetBluePixelComponent(q));
+ hue=(double) (QuantumScale*GetPixelRed(q));
+ saturation=(double) (QuantumScale*GetPixelGreen(q));
+ brightness=(double) (QuantumScale*GetPixelBlue(q));
ConvertHSBToRGB(hue,saturation,brightness,&red,&green,&blue);
- SetRedPixelComponent(q,red);
- SetGreenPixelComponent(q,green);
- SetBluePixelComponent(q,blue);
+ SetPixelRed(q,red);
+ SetPixelGreen(q,green);
+ SetPixelBlue(q,blue);
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
green,
red;
- hue=(double) (QuantumScale*GetRedPixelComponent(q));
- saturation=(double) (QuantumScale*GetGreenPixelComponent(q));
- lightness=(double) (QuantumScale*GetBluePixelComponent(q));
+ hue=(double) (QuantumScale*GetPixelRed(q));
+ saturation=(double) (QuantumScale*GetPixelGreen(q));
+ lightness=(double) (QuantumScale*GetPixelBlue(q));
ConvertHSLToRGB(hue,saturation,lightness,&red,&green,&blue);
- SetRedPixelComponent(q,red);
- SetGreenPixelComponent(q,green);
- SetBluePixelComponent(q,blue);
+ SetPixelRed(q,red);
+ SetPixelGreen(q,green);
+ SetPixelBlue(q,blue);
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
green,
red;
- hue=(double) (QuantumScale*GetRedPixelComponent(q));
- whiteness=(double) (QuantumScale*GetGreenPixelComponent(q));
- blackness=(double) (QuantumScale*GetBluePixelComponent(q));
+ hue=(double) (QuantumScale*GetPixelRed(q));
+ whiteness=(double) (QuantumScale*GetPixelGreen(q));
+ blackness=(double) (QuantumScale*GetPixelBlue(q));
ConvertHWBToRGB(hue,whiteness,blackness,&red,&green,&blue);
- SetRedPixelComponent(q,red);
- SetGreenPixelComponent(q,green);
- SetBluePixelComponent(q,blue);
+ SetPixelRed(q,red);
+ SetPixelGreen(q,green);
+ SetPixelBlue(q,blue);
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
green,
red;
- L=QuantumScale*GetRedPixelComponent(q);
- a=QuantumScale*GetGreenPixelComponent(q);
- b=QuantumScale*GetBluePixelComponent(q);
+ L=QuantumScale*GetPixelRed(q);
+ a=QuantumScale*GetPixelGreen(q);
+ b=QuantumScale*GetPixelBlue(q);
ConvertLabToXYZ(L,a,b,&X,&Y,&Z);
ConvertXYZToRGB(X,Y,Z,&red,&green,&blue);
- SetRedPixelComponent(q,red);
- SetGreenPixelComponent(q,green);
- SetBluePixelComponent(q,blue);
+ SetPixelRed(q,red);
+ SetPixelGreen(q,green);
+ SetPixelBlue(q,blue);
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
}
for (x=(ssize_t) image->columns; x != 0; x--)
{
- SetRedPixelComponent(q,logmap[ScaleQuantumToMap(
- GetRedPixelComponent(q))]);
- SetGreenPixelComponent(q,logmap[ScaleQuantumToMap(
- GetGreenPixelComponent(q))]);
- SetBluePixelComponent(q,logmap[ScaleQuantumToMap(
- GetBluePixelComponent(q))]);
+ SetPixelRed(q,logmap[ScaleQuantumToMap(
+ GetPixelRed(q))]);
+ SetPixelGreen(q,logmap[ScaleQuantumToMap(
+ GetPixelGreen(q))]);
+ SetPixelBlue(q,logmap[ScaleQuantumToMap(
+ GetPixelBlue(q))]);
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
green,
red;
- red=ScaleQuantumToMap(GetRedPixelComponent(q));
- green=ScaleQuantumToMap(GetGreenPixelComponent(q));
- blue=ScaleQuantumToMap(GetBluePixelComponent(q));
+ red=ScaleQuantumToMap(GetPixelRed(q));
+ green=ScaleQuantumToMap(GetPixelGreen(q));
+ blue=ScaleQuantumToMap(GetPixelBlue(q));
pixel.red=x_map[red].x+y_map[green].x+z_map[blue].x;
pixel.green=x_map[red].y+y_map[green].y+z_map[blue].y;
pixel.blue=x_map[red].z+y_map[green].z+z_map[blue].z;
default:
break;
}
- SetRedPixelComponent(q,ScaleMapToQuantum((MagickRealType) MaxMap*
+ SetPixelRed(q,ScaleMapToQuantum((MagickRealType) MaxMap*
QuantumScale*pixel.red));
- SetGreenPixelComponent(q,ScaleMapToQuantum((MagickRealType) MaxMap*
+ SetPixelGreen(q,ScaleMapToQuantum((MagickRealType) MaxMap*
QuantumScale*pixel.green));
- SetBluePixelComponent(q,ScaleMapToQuantum((MagickRealType) MaxMap*
+ SetPixelBlue(q,ScaleMapToQuantum((MagickRealType) MaxMap*
QuantumScale*pixel.blue));
q++;
}
else
{
if (((channel & RedChannel) != 0) &&
- (GetRedPixelComponent(p) != GetRedPixelComponent(q)))
+ (GetPixelRed(p) != GetPixelRed(q)))
difference=MagickTrue;
if (((channel & GreenChannel) != 0) &&
- (GetGreenPixelComponent(p) != GetGreenPixelComponent(q)))
+ (GetPixelGreen(p) != GetPixelGreen(q)))
difference=MagickTrue;
if (((channel & BlueChannel) != 0) &&
- (GetBluePixelComponent(p) != GetBluePixelComponent(q)))
+ (GetPixelBlue(p) != GetPixelBlue(q)))
difference=MagickTrue;
if (((channel & OpacityChannel) != 0) &&
(image->matte != MagickFalse) &&
- (GetOpacityPixelComponent(p) != GetOpacityPixelComponent(q)))
+ (GetPixelOpacity(p) != GetPixelOpacity(q)))
difference=MagickTrue;
if ((((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace) &&
(reconstruct_image->colorspace == CMYKColorspace)) &&
- (GetIndexPixelComponent(indexes+x) !=
- GetIndexPixelComponent(reconstruct_indexes+x)))
+ (GetPixelIndex(indexes+x) !=
+ GetPixelIndex(reconstruct_indexes+x)))
difference=MagickTrue;
}
if (difference != MagickFalse)
if ((channel & RedChannel) != 0)
{
- distance=QuantumScale*(GetRedPixelComponent(p)-(MagickRealType)
- GetRedPixelComponent(q));
+ distance=QuantumScale*(GetPixelRed(p)-(MagickRealType)
+ GetPixelRed(q));
channel_distortion[RedChannel]+=distance*distance;
channel_distortion[CompositeChannels]+=distance*distance;
}
if ((channel & GreenChannel) != 0)
{
- distance=QuantumScale*(GetGreenPixelComponent(p)-(MagickRealType)
- GetGreenPixelComponent(q));
+ distance=QuantumScale*(GetPixelGreen(p)-(MagickRealType)
+ GetPixelGreen(q));
channel_distortion[GreenChannel]+=distance*distance;
channel_distortion[CompositeChannels]+=distance*distance;
}
if ((channel & BlueChannel) != 0)
{
- distance=QuantumScale*(GetBluePixelComponent(p)-(MagickRealType)
- GetBluePixelComponent(q));
+ distance=QuantumScale*(GetPixelBlue(p)-(MagickRealType)
+ GetPixelBlue(q));
channel_distortion[BlueChannel]+=distance*distance;
channel_distortion[CompositeChannels]+=distance*distance;
}
(reconstruct_image->matte != MagickFalse)))
{
distance=QuantumScale*((image->matte != MagickFalse ?
- GetOpacityPixelComponent(p) : OpaqueOpacity)-
+ GetPixelOpacity(p) : OpaqueOpacity)-
(reconstruct_image->matte != MagickFalse ?
- GetOpacityPixelComponent(q): OpaqueOpacity));
+ GetPixelOpacity(q): OpaqueOpacity));
channel_distortion[OpacityChannel]+=distance*distance;
channel_distortion[CompositeChannels]+=distance*distance;
}
(image->colorspace == CMYKColorspace) &&
(reconstruct_image->colorspace == CMYKColorspace))
{
- distance=QuantumScale*(GetIndexPixelComponent(indexes+x)-
- (MagickRealType) GetIndexPixelComponent(reconstruct_indexes+x));
+ distance=QuantumScale*(GetPixelIndex(indexes+x)-
+ (MagickRealType) GetPixelIndex(reconstruct_indexes+x));
channel_distortion[BlackChannel]+=distance*distance;
channel_distortion[CompositeChannels]+=distance*distance;
}
if ((channel & RedChannel) != 0)
{
- distance=QuantumScale*fabs(GetRedPixelComponent(p)-(double)
- GetRedPixelComponent(q));
+ distance=QuantumScale*fabs(GetPixelRed(p)-(double)
+ GetPixelRed(q));
channel_distortion[RedChannel]+=distance;
channel_distortion[CompositeChannels]+=distance;
}
if ((channel & GreenChannel) != 0)
{
- distance=QuantumScale*fabs(GetGreenPixelComponent(p)-(double)
- GetGreenPixelComponent(q));
+ distance=QuantumScale*fabs(GetPixelGreen(p)-(double)
+ GetPixelGreen(q));
channel_distortion[GreenChannel]+=distance;
channel_distortion[CompositeChannels]+=distance;
}
if ((channel & BlueChannel) != 0)
{
- distance=QuantumScale*fabs(GetBluePixelComponent(p)-(double)
- GetBluePixelComponent(q));
+ distance=QuantumScale*fabs(GetPixelBlue(p)-(double)
+ GetPixelBlue(q));
channel_distortion[BlueChannel]+=distance;
channel_distortion[CompositeChannels]+=distance;
}
if (((channel & OpacityChannel) != 0) &&
(image->matte != MagickFalse))
{
- distance=QuantumScale*fabs(GetOpacityPixelComponent(p)-(double)
- GetOpacityPixelComponent(q));
+ distance=QuantumScale*fabs(GetPixelOpacity(p)-(double)
+ GetPixelOpacity(q));
channel_distortion[OpacityChannel]+=distance;
channel_distortion[CompositeChannels]+=distance;
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
{
- distance=QuantumScale*fabs(GetIndexPixelComponent(indexes+x)-(double)
- GetIndexPixelComponent(reconstruct_indexes+x));
+ distance=QuantumScale*fabs(GetPixelIndex(indexes+x)-(double)
+ GetPixelIndex(reconstruct_indexes+x));
channel_distortion[BlackChannel]+=distance;
channel_distortion[CompositeChannels]+=distance;
}
if ((channel & OpacityChannel) != 0)
{
if (image->matte != MagickFalse)
- alpha=(MagickRealType) (QuantumScale*(GetAlphaPixelComponent(p)));
+ alpha=(MagickRealType) (QuantumScale*(GetPixelAlpha(p)));
if (reconstruct_image->matte != MagickFalse)
- beta=(MagickRealType) (QuantumScale*GetAlphaPixelComponent(q));
+ beta=(MagickRealType) (QuantumScale*GetPixelAlpha(q));
}
if ((channel & RedChannel) != 0)
{
- distance=fabs(alpha*GetRedPixelComponent(p)-beta*
- GetRedPixelComponent(q));
+ distance=fabs(alpha*GetPixelRed(p)-beta*
+ GetPixelRed(q));
distortion[RedChannel]+=distance;
distortion[CompositeChannels]+=distance;
mean_error+=distance*distance;
}
if ((channel & GreenChannel) != 0)
{
- distance=fabs(alpha*GetGreenPixelComponent(p)-beta*
- GetGreenPixelComponent(q));
+ distance=fabs(alpha*GetPixelGreen(p)-beta*
+ GetPixelGreen(q));
distortion[GreenChannel]+=distance;
distortion[CompositeChannels]+=distance;
mean_error+=distance*distance;
}
if ((channel & BlueChannel) != 0)
{
- distance=fabs(alpha*GetBluePixelComponent(p)-beta*
- GetBluePixelComponent(q));
+ distance=fabs(alpha*GetPixelBlue(p)-beta*
+ GetPixelBlue(q));
distortion[BlueChannel]+=distance;
distortion[CompositeChannels]+=distance;
mean_error+=distance*distance;
if (((channel & OpacityChannel) != 0) &&
(image->matte != MagickFalse))
{
- distance=fabs((double) GetOpacityPixelComponent(p)-
- GetOpacityPixelComponent(q));
+ distance=fabs((double) GetPixelOpacity(p)-
+ GetPixelOpacity(q));
distortion[OpacityChannel]+=distance;
distortion[CompositeChannels]+=distance;
mean_error+=distance*distance;
(image->colorspace == CMYKColorspace) &&
(reconstruct_image->colorspace == CMYKColorspace))
{
- distance=fabs(alpha*GetIndexPixelComponent(indexes+x)-beta*
- GetIndexPixelComponent(reconstruct_indexes+x));
+ distance=fabs(alpha*GetPixelIndex(indexes+x)-beta*
+ GetPixelIndex(reconstruct_indexes+x));
distortion[BlackChannel]+=distance;
distortion[CompositeChannels]+=distance;
mean_error+=distance*distance;
if ((channel & RedChannel) != 0)
{
- distance=QuantumScale*(GetRedPixelComponent(p)-(MagickRealType)
- GetRedPixelComponent(q));
+ distance=QuantumScale*(GetPixelRed(p)-(MagickRealType)
+ GetPixelRed(q));
channel_distortion[RedChannel]+=distance*distance;
channel_distortion[CompositeChannels]+=distance*distance;
}
if ((channel & GreenChannel) != 0)
{
- distance=QuantumScale*(GetGreenPixelComponent(p)-(MagickRealType)
- GetGreenPixelComponent(q));
+ distance=QuantumScale*(GetPixelGreen(p)-(MagickRealType)
+ GetPixelGreen(q));
channel_distortion[GreenChannel]+=distance*distance;
channel_distortion[CompositeChannels]+=distance*distance;
}
if ((channel & BlueChannel) != 0)
{
- distance=QuantumScale*(GetBluePixelComponent(p)-(MagickRealType)
- GetBluePixelComponent(q));
+ distance=QuantumScale*(GetPixelBlue(p)-(MagickRealType)
+ GetPixelBlue(q));
channel_distortion[BlueChannel]+=distance*distance;
channel_distortion[CompositeChannels]+=distance*distance;
}
if (((channel & OpacityChannel) != 0) &&
(image->matte != MagickFalse))
{
- distance=QuantumScale*(GetOpacityPixelComponent(p)-(MagickRealType)
- GetOpacityPixelComponent(q));
+ distance=QuantumScale*(GetPixelOpacity(p)-(MagickRealType)
+ GetPixelOpacity(q));
channel_distortion[OpacityChannel]+=distance*distance;
channel_distortion[CompositeChannels]+=distance*distance;
}
(image->colorspace == CMYKColorspace) &&
(reconstruct_image->colorspace == CMYKColorspace))
{
- distance=QuantumScale*(GetIndexPixelComponent(indexes+x)-
- (MagickRealType) GetIndexPixelComponent(reconstruct_indexes+x));
+ distance=QuantumScale*(GetPixelIndex(indexes+x)-
+ (MagickRealType) GetPixelIndex(reconstruct_indexes+x));
channel_distortion[BlackChannel]+=distance*distance;
channel_distortion[CompositeChannels]+=distance*distance;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- distortion[RedChannel]+=area*QuantumScale*(GetRedPixelComponent(p)-
- image_statistics[RedChannel].mean)*(GetRedPixelComponent(q)-
+ distortion[RedChannel]+=area*QuantumScale*(GetPixelRed(p)-
+ image_statistics[RedChannel].mean)*(GetPixelRed(q)-
reconstruct_statistics[RedChannel].mean);
if ((channel & GreenChannel) != 0)
- distortion[GreenChannel]+=area*QuantumScale*(GetGreenPixelComponent(p)-
- image_statistics[GreenChannel].mean)*(GetGreenPixelComponent(q)-
+ distortion[GreenChannel]+=area*QuantumScale*(GetPixelGreen(p)-
+ image_statistics[GreenChannel].mean)*(GetPixelGreen(q)-
reconstruct_statistics[GreenChannel].mean);
if ((channel & BlueChannel) != 0)
- distortion[BlueChannel]+=area*QuantumScale*(GetBluePixelComponent(p)-
- image_statistics[BlueChannel].mean)*(GetBluePixelComponent(q)-
+ distortion[BlueChannel]+=area*QuantumScale*(GetPixelBlue(p)-
+ image_statistics[BlueChannel].mean)*(GetPixelBlue(q)-
reconstruct_statistics[BlueChannel].mean);
if (((channel & OpacityChannel) != 0) &&
(image->matte != MagickFalse))
distortion[OpacityChannel]+=area*QuantumScale*(
- GetOpacityPixelComponent(p)-image_statistics[OpacityChannel].mean)*
- (GetOpacityPixelComponent(q)-
+ GetPixelOpacity(p)-image_statistics[OpacityChannel].mean)*
+ (GetPixelOpacity(q)-
reconstruct_statistics[OpacityChannel].mean);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace) &&
(reconstruct_image->colorspace == CMYKColorspace))
distortion[BlackChannel]+=area*QuantumScale*(
- GetIndexPixelComponent(indexes+x)-
+ GetPixelIndex(indexes+x)-
image_statistics[OpacityChannel].mean)*(
- GetIndexPixelComponent(reconstruct_indexes+x)-
+ GetPixelIndex(reconstruct_indexes+x)-
reconstruct_statistics[OpacityChannel].mean);
p++;
q++;
if ((channel & RedChannel) != 0)
{
- distance=QuantumScale*fabs(GetRedPixelComponent(p)-(double)
- GetRedPixelComponent(q));
+ distance=QuantumScale*fabs(GetPixelRed(p)-(double)
+ GetPixelRed(q));
if (distance > channel_distortion[RedChannel])
channel_distortion[RedChannel]=distance;
if (distance > channel_distortion[CompositeChannels])
}
if ((channel & GreenChannel) != 0)
{
- distance=QuantumScale*fabs(GetGreenPixelComponent(p)-(double)
- GetGreenPixelComponent(q));
+ distance=QuantumScale*fabs(GetPixelGreen(p)-(double)
+ GetPixelGreen(q));
if (distance > channel_distortion[GreenChannel])
channel_distortion[GreenChannel]=distance;
if (distance > channel_distortion[CompositeChannels])
}
if ((channel & BlueChannel) != 0)
{
- distance=QuantumScale*fabs(GetBluePixelComponent(p)-(double)
- GetBluePixelComponent(q));
+ distance=QuantumScale*fabs(GetPixelBlue(p)-(double)
+ GetPixelBlue(q));
if (distance > channel_distortion[BlueChannel])
channel_distortion[BlueChannel]=distance;
if (distance > channel_distortion[CompositeChannels])
if (((channel & OpacityChannel) != 0) &&
(image->matte != MagickFalse))
{
- distance=QuantumScale*fabs(GetOpacityPixelComponent(p)-(double)
- GetOpacityPixelComponent(q));
+ distance=QuantumScale*fabs(GetPixelOpacity(p)-(double)
+ GetPixelOpacity(q));
if (distance > channel_distortion[OpacityChannel])
channel_distortion[OpacityChannel]=distance;
if (distance > channel_distortion[CompositeChannels])
(image->colorspace == CMYKColorspace) &&
(reconstruct_image->colorspace == CMYKColorspace))
{
- distance=QuantumScale*fabs(GetIndexPixelComponent(indexes+x)-(double)
- GetIndexPixelComponent(reconstruct_indexes+x));
+ distance=QuantumScale*fabs(GetPixelIndex(indexes+x)-(double)
+ GetPixelIndex(reconstruct_indexes+x));
if (distance > channel_distortion[BlackChannel])
channel_distortion[BlackChannel]=distance;
if (distance > channel_distortion[CompositeChannels])
MagickRealType
distance;
- distance=fabs(GetRedPixelComponent(p)-(double)
- GetRedPixelComponent(q));
+ distance=fabs(GetPixelRed(p)-(double)
+ GetPixelRed(q));
mean_error_per_pixel+=distance;
mean_error+=distance*distance;
if (distance > maximum_error)
maximum_error=distance;
area++;
- distance=fabs(GetGreenPixelComponent(p)-(double)
- GetGreenPixelComponent(q));
+ distance=fabs(GetPixelGreen(p)-(double)
+ GetPixelGreen(q));
mean_error_per_pixel+=distance;
mean_error+=distance*distance;
if (distance > maximum_error)
maximum_error=distance;
area++;
- distance=fabs(GetBluePixelComponent(p)-(double)
- GetBluePixelComponent(q));
+ distance=fabs(GetPixelBlue(p)-(double)
+ GetPixelBlue(q));
mean_error_per_pixel+=distance;
mean_error+=distance*distance;
if (distance > maximum_error)
area++;
if (image->matte != MagickFalse)
{
- distance=fabs(GetOpacityPixelComponent(p)-(double)
- GetOpacityPixelComponent(q));
+ distance=fabs(GetPixelOpacity(p)-(double)
+ GetPixelOpacity(q));
mean_error_per_pixel+=distance;
mean_error+=distance*distance;
if (distance > maximum_error)
if ((image->colorspace == CMYKColorspace) &&
(reconstruct_image->colorspace == CMYKColorspace))
{
- distance=fabs(GetIndexPixelComponent(indexes+x)-(double)
- GetIndexPixelComponent(reconstruct_indexes+x));
+ distance=fabs(GetPixelIndex(indexes+x)-(double)
+ GetPixelIndex(reconstruct_indexes+x));
mean_error_per_pixel+=distance;
mean_error+=distance*distance;
if (distance > maximum_error)
reconstruct_indexes=GetCacheViewVirtualIndexQueue(reconstruct_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- distortion+=area*QuantumScale*(GetRedPixelComponent(p)-
- image_statistics[RedChannel].mean)*(GetRedPixelComponent(q)-
+ distortion+=area*QuantumScale*(GetPixelRed(p)-
+ image_statistics[RedChannel].mean)*(GetPixelRed(q)-
reconstruct_statistics[RedChannel].mean);
- distortion+=area*QuantumScale*(GetGreenPixelComponent(p)-
- image_statistics[GreenChannel].mean)*(GetGreenPixelComponent(q)-
+ distortion+=area*QuantumScale*(GetPixelGreen(p)-
+ image_statistics[GreenChannel].mean)*(GetPixelGreen(q)-
reconstruct_statistics[GreenChannel].mean);
- distortion+=area*QuantumScale*(GetBluePixelComponent(p)-
+ distortion+=area*QuantumScale*(GetPixelBlue(p)-
image_statistics[BlueChannel].mean)*(q->blue-
reconstruct_statistics[BlueChannel].mean);
if (image->matte != MagickFalse)
- distortion+=area*QuantumScale*(GetOpacityPixelComponent(p)-
- image_statistics[OpacityChannel].mean)*(GetOpacityPixelComponent(q)-
+ distortion+=area*QuantumScale*(GetPixelOpacity(p)-
+ image_statistics[OpacityChannel].mean)*(GetPixelOpacity(q)-
reconstruct_statistics[OpacityChannel].mean);
if ((image->colorspace == CMYKColorspace) &&
(reconstruct_image->colorspace == CMYKColorspace))
- distortion+=area*QuantumScale*(GetIndexPixelComponent(indexes+x)-
- image_statistics[BlackChannel].mean)*(GetIndexPixelComponent(
+ distortion+=area*QuantumScale*(GetPixelIndex(indexes+x)-
+ image_statistics[BlackChannel].mean)*(GetPixelIndex(
reconstruct_indexes+x)-reconstruct_statistics[BlackChannel].mean);
p++;
q++;
offset->x=x;
offset->y=y;
}
- SetRedPixelComponent(q,ClampToQuantum(QuantumRange-QuantumRange*
+ SetPixelRed(q,ClampToQuantum(QuantumRange-QuantumRange*
similarity));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (SyncCacheViewAuthenticPixels(similarity_view,exception) == MagickFalse)
#if !defined(MAGICKCORE_HDRI_SUPPORT)
composite->opacity=(Quantum) (QuantumRange*(1.0-gamma)+0.5);
gamma=1.0/(gamma <= MagickEpsilon ? 1.0 : gamma);
- SetRedPixelComponent(composite,gamma*MagickOver_((MagickRealType)
- GetRedPixelComponent(p),alpha,(MagickRealType)
- GetRedPixelComponent(q),beta)+0.5);
- SetGreenPixelComponent(composite,gamma*MagickOver_((MagickRealType)
- GetGreenPixelComponent(p),alpha,(MagickRealType)
- GetGreenPixelComponent(q),beta)+0.5);
- SetBluePixelComponent(composite,gamma*MagickOver_((MagickRealType)
- GetBluePixelComponent(p),alpha,(MagickRealType)
- GetBluePixelComponent(q),beta)+0.5);
+ SetPixelRed(composite,gamma*MagickOver_((MagickRealType)
+ GetPixelRed(p),alpha,(MagickRealType)
+ GetPixelRed(q),beta)+0.5);
+ SetPixelGreen(composite,gamma*MagickOver_((MagickRealType)
+ GetPixelGreen(p),alpha,(MagickRealType)
+ GetPixelGreen(q),beta)+0.5);
+ SetPixelBlue(composite,gamma*MagickOver_((MagickRealType)
+ GetPixelBlue(p),alpha,(MagickRealType)
+ GetPixelBlue(q),beta)+0.5);
#else
- SetOpacityPixelComponent(composite,QuantumRange*(1.0-gamma));
+ SetPixelOpacity(composite,QuantumRange*(1.0-gamma));
gamma=1.0/(gamma <= MagickEpsilon ? 1.0 : gamma);
- SetRedPixelComponent(composite,gamma*MagickOver_((MagickRealType)
- GetRedPixelComponent(p),alpha,(MagickRealType)
- GetRedPixelComponent(q),beta));
- SetGreenPixelComponent(composite,gamma*MagickOver_((MagickRealType)
- GetGreenPixelComponent(p),alpha,(MagickRealType)
- GetGreenPixelComponent(q),beta));
- SetBluePixelComponent(composite,gamma*MagickOver_((MagickRealType)
- GetBluePixelComponent(p),alpha,(MagickRealType)
- GetBluePixelComponent(q),beta));
+ SetPixelRed(composite,gamma*MagickOver_((MagickRealType)
+ GetPixelRed(p),alpha,(MagickRealType)
+ GetPixelRed(q),beta));
+ SetPixelGreen(composite,gamma*MagickOver_((MagickRealType)
+ GetPixelGreen(p),alpha,(MagickRealType)
+ GetPixelGreen(q),beta));
+ SetPixelBlue(composite,gamma*MagickOver_((MagickRealType)
+ GetPixelBlue(p),alpha,(MagickRealType)
+ GetPixelBlue(q),beta));
#endif
}
angle;
angle=angle_start+angle_range*QuantumScale*
- GetBluePixelComponent(p);
+ GetPixelBlue(p);
blur.x1=width*cos(angle);
blur.x2=width*sin(angle);
blur.y1=(-height*sin(angle));
blur.y2=height*cos(angle);
}
ScaleResampleFilter(resample_filter,blur.x1*QuantumScale*
- GetRedPixelComponent(p),blur.y1*QuantumScale*
- GetGreenPixelComponent(p),blur.x2*QuantumScale*
- GetRedPixelComponent(p),blur.y2*QuantumScale*
- GetGreenPixelComponent(p));
+ GetPixelRed(p),blur.y1*QuantumScale*
+ GetPixelGreen(p),blur.x2*QuantumScale*
+ GetPixelRed(p),blur.y2*QuantumScale*
+ GetPixelGreen(p));
(void) ResamplePixelColor(resample_filter,(double) x_offset+x,
(double) y_offset+y,&pixel);
SetPixelPacket(destination_image,&pixel,r,destination_indexes+x);
/*
Displace the offset.
*/
- offset.x=(horizontal_scale*(GetRedPixelComponent(p)-
+ offset.x=(horizontal_scale*(GetPixelRed(p)-
(((MagickRealType) QuantumRange+1.0)/2.0)))/(((MagickRealType)
QuantumRange+1.0)/2.0)+center.x+((compose == DisplaceCompositeOp) ?
x : 0);
- offset.y=(vertical_scale*(GetGreenPixelComponent(p)-
+ offset.y=(vertical_scale*(GetPixelGreen(p)-
(((MagickRealType) QuantumRange+1.0)/2.0)))/(((MagickRealType)
QuantumRange+1.0)/2.0)+center.y+((compose == DisplaceCompositeOp) ?
y : 0);
Mask with the 'invalid pixel mask' in alpha channel.
*/
pixel.opacity=(MagickRealType) QuantumRange*(1.0-(1.0-QuantumScale*
- pixel.opacity)*(1.0-QuantumScale*GetOpacityPixelComponent(p)));
+ pixel.opacity)*(1.0-QuantumScale*GetPixelOpacity(p)));
SetPixelPacket(destination_image,&pixel,r,destination_indexes+x);
p++;
r++;
if ((x-x_offset) >= (ssize_t) composite_image->columns)
break;
}
- destination.red=(MagickRealType) GetRedPixelComponent(q);
- destination.green=(MagickRealType) GetGreenPixelComponent(q);
- destination.blue=(MagickRealType) GetBluePixelComponent(q);
+ destination.red=(MagickRealType) GetPixelRed(q);
+ destination.green=(MagickRealType) GetPixelGreen(q);
+ destination.blue=(MagickRealType) GetPixelBlue(q);
if (image->matte != MagickFalse)
- destination.opacity=(MagickRealType) GetOpacityPixelComponent(q);
+ destination.opacity=(MagickRealType) GetPixelOpacity(q);
if (image->colorspace == CMYKColorspace)
- destination.index=(MagickRealType) GetIndexPixelComponent(indexes+x);
+ destination.index=(MagickRealType) GetPixelIndex(indexes+x);
if (image->colorspace == CMYKColorspace)
{
destination.red=(MagickRealType) QuantumRange-destination.red;
composite.blue=(MagickRealType) QuantumRange-composite.blue;
composite.index=(MagickRealType) QuantumRange-composite.index;
}
- SetRedPixelComponent(q,ClampToQuantum(composite.red));
- SetGreenPixelComponent(q,ClampToQuantum(composite.green));
- SetBluePixelComponent(q,ClampToQuantum(composite.blue));
+ SetPixelRed(q,ClampToQuantum(composite.red));
+ SetPixelGreen(q,ClampToQuantum(composite.green));
+ SetPixelBlue(q,ClampToQuantum(composite.blue));
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,ClampToQuantum(composite.opacity));
+ SetPixelOpacity(q,ClampToQuantum(composite.opacity));
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(indexes+x,ClampToQuantum(composite.index));
+ SetPixelIndex(indexes+x,ClampToQuantum(composite.index));
q++;
continue;
}
/*
Handle normal overlay of source onto destination.
*/
- source.red=(MagickRealType) GetRedPixelComponent(p);
- source.green=(MagickRealType) GetGreenPixelComponent(p);
- source.blue=(MagickRealType) GetBluePixelComponent(p);
+ source.red=(MagickRealType) GetPixelRed(p);
+ source.green=(MagickRealType) GetPixelGreen(p);
+ source.blue=(MagickRealType) GetPixelBlue(p);
if (composite_image->matte != MagickFalse)
- source.opacity=(MagickRealType) GetOpacityPixelComponent(p);
+ source.opacity=(MagickRealType) GetPixelOpacity(p);
if (composite_image->colorspace == CMYKColorspace)
- source.index=(MagickRealType) GetIndexPixelComponent(composite_indexes+
+ source.index=(MagickRealType) GetPixelIndex(composite_indexes+
x-x_offset);
if (composite_image->colorspace == CMYKColorspace)
{
composite.blue=(MagickRealType) QuantumRange-composite.blue;
composite.index=(MagickRealType) QuantumRange-composite.index;
}
- SetRedPixelComponent(q,ClampToQuantum(composite.red));
- SetGreenPixelComponent(q,ClampToQuantum(composite.green));
- SetBluePixelComponent(q,ClampToQuantum(composite.blue));
- SetOpacityPixelComponent(q,ClampToQuantum(composite.opacity));
+ SetPixelRed(q,ClampToQuantum(composite.red));
+ SetPixelGreen(q,ClampToQuantum(composite.green));
+ SetPixelBlue(q,ClampToQuantum(composite.blue));
+ SetPixelOpacity(q,ClampToQuantum(composite.opacity));
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(indexes+x,ClampToQuantum(composite.index));
+ SetPixelIndex(indexes+x,ClampToQuantum(composite.index));
p++;
if (p >= (pixels+composite_image->columns))
p=pixels;
for (x=0; x < (ssize_t) image->columns; x++)
{
index=(IndexPacket) (*p++);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
break;
}
for (x=0; x < y; x++)
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetRedPixelComponent(q)*HighlightFactor+(MagickRealType) foreground*
+ SetPixelRed(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelRed(q)*HighlightFactor+(MagickRealType) foreground*
(QuantumRange-HighlightFactor))));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetGreenPixelComponent(q)*HighlightFactor+(MagickRealType) foreground*
+ SetPixelGreen(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelGreen(q)*HighlightFactor+(MagickRealType) foreground*
(QuantumRange-HighlightFactor))));
- SetBluePixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetBluePixelComponent(q)*HighlightFactor+(MagickRealType) foreground*
+ SetPixelBlue(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelBlue(q)*HighlightFactor+(MagickRealType) foreground*
(QuantumRange-HighlightFactor))));
q++;
}
for ( ; x < (ssize_t) (image->columns-y); x++)
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetRedPixelComponent(q)*AccentuateFactor+(MagickRealType) foreground*
+ SetPixelRed(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelRed(q)*AccentuateFactor+(MagickRealType) foreground*
(QuantumRange-AccentuateFactor))));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetGreenPixelComponent(q)*AccentuateFactor+(MagickRealType) foreground*
+ SetPixelGreen(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelGreen(q)*AccentuateFactor+(MagickRealType) foreground*
(QuantumRange-AccentuateFactor))));
- SetBluePixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetBluePixelComponent(q)*AccentuateFactor+(MagickRealType) foreground*
+ SetPixelBlue(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelBlue(q)*AccentuateFactor+(MagickRealType) foreground*
(QuantumRange-AccentuateFactor))));
q++;
}
for ( ; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetRedPixelComponent(q)*ShadowFactor+(MagickRealType) background*
+ SetPixelRed(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelRed(q)*ShadowFactor+(MagickRealType) background*
(QuantumRange-ShadowFactor))));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetGreenPixelComponent(q)*ShadowFactor+(MagickRealType) background*
+ SetPixelGreen(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelGreen(q)*ShadowFactor+(MagickRealType) background*
(QuantumRange-ShadowFactor))));
- SetBluePixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetBluePixelComponent(q)*ShadowFactor+(MagickRealType) background*
+ SetPixelBlue(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelBlue(q)*ShadowFactor+(MagickRealType) background*
(QuantumRange-ShadowFactor))));
q++;
}
}
for (x=0; x < (ssize_t) raise_info->width; x++)
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetRedPixelComponent(q)*HighlightFactor+(MagickRealType) foreground*
+ SetPixelRed(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelRed(q)*HighlightFactor+(MagickRealType) foreground*
(QuantumRange-HighlightFactor))));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetGreenPixelComponent(q)*HighlightFactor+(MagickRealType) foreground*
+ SetPixelGreen(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelGreen(q)*HighlightFactor+(MagickRealType) foreground*
(QuantumRange-HighlightFactor))));
- SetBluePixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetBluePixelComponent(q)*HighlightFactor+(MagickRealType) foreground*
+ SetPixelBlue(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelBlue(q)*HighlightFactor+(MagickRealType) foreground*
(QuantumRange-HighlightFactor))));
q++;
}
q++;
for ( ; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetRedPixelComponent(q)*ShadowFactor+(MagickRealType) background*
+ SetPixelRed(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelRed(q)*ShadowFactor+(MagickRealType) background*
(QuantumRange-ShadowFactor))));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetGreenPixelComponent(q)*ShadowFactor+(MagickRealType) background*
+ SetPixelGreen(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelGreen(q)*ShadowFactor+(MagickRealType) background*
(QuantumRange-ShadowFactor))));
- SetBluePixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetBluePixelComponent(q)*ShadowFactor+(MagickRealType) background*
+ SetPixelBlue(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelBlue(q)*ShadowFactor+(MagickRealType) background*
(QuantumRange-ShadowFactor))));
q++;
}
}
for (x=0; x < (ssize_t) (image->rows-y); x++)
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetRedPixelComponent(q)*HighlightFactor+(MagickRealType) foreground*
+ SetPixelRed(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelRed(q)*HighlightFactor+(MagickRealType) foreground*
(QuantumRange-HighlightFactor))));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetGreenPixelComponent(q)*HighlightFactor+(MagickRealType) foreground*
+ SetPixelGreen(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelGreen(q)*HighlightFactor+(MagickRealType) foreground*
(QuantumRange-HighlightFactor))));
- SetBluePixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetBluePixelComponent(q)*HighlightFactor+(MagickRealType) foreground*
+ SetPixelBlue(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelBlue(q)*HighlightFactor+(MagickRealType) foreground*
(QuantumRange-HighlightFactor))));
q++;
}
for ( ; x < (ssize_t) (image->columns-(image->rows-y)); x++)
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetRedPixelComponent(q)*TroughFactor+(MagickRealType) background*
+ SetPixelRed(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelRed(q)*TroughFactor+(MagickRealType) background*
(QuantumRange-TroughFactor))));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetGreenPixelComponent(q)*TroughFactor+(MagickRealType) background*
+ SetPixelGreen(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelGreen(q)*TroughFactor+(MagickRealType) background*
(QuantumRange-TroughFactor))));
- SetBluePixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetBluePixelComponent(q)*TroughFactor+(MagickRealType) background*
+ SetPixelBlue(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelBlue(q)*TroughFactor+(MagickRealType) background*
(QuantumRange-TroughFactor))));
q++;
}
for ( ; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetRedPixelComponent(q)*ShadowFactor+(MagickRealType) background*
+ SetPixelRed(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelRed(q)*ShadowFactor+(MagickRealType) background*
(QuantumRange-ShadowFactor))));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetGreenPixelComponent(q)*ShadowFactor+(MagickRealType) background*
+ SetPixelGreen(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelGreen(q)*ShadowFactor+(MagickRealType) background*
(QuantumRange-ShadowFactor))));
- SetBluePixelComponent(q,ClampToQuantum(QuantumScale*((MagickRealType)
- GetBluePixelComponent(q)*ShadowFactor+(MagickRealType) background*
+ SetPixelBlue(q,ClampToQuantum(QuantumScale*((MagickRealType)
+ GetPixelBlue(q)*ShadowFactor+(MagickRealType) background*
(QuantumRange-ShadowFactor))));
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(p) != OpaqueOpacity)
+ if (GetPixelOpacity(p) != OpaqueOpacity)
{
(void) GetFillColor(draw_info,x,y,&fill_color);
MagickCompositeOver(&fill_color,(MagickRealType) fill_color.opacity,q,
MagickRealType
pixel;
- pixel=QuantumScale*(GetRedPixelComponent(p)-(double)
- GetRedPixelComponent(q));
+ pixel=QuantumScale*(GetPixelRed(p)-(double)
+ GetPixelRed(q));
similarity+=pixel*pixel;
- pixel=QuantumScale*(GetGreenPixelComponent(p)-(double)
- GetGreenPixelComponent(q));
+ pixel=QuantumScale*(GetPixelGreen(p)-(double)
+ GetPixelGreen(q));
similarity+=pixel*pixel;
- pixel=QuantumScale*(GetBluePixelComponent(p)-(double)
- GetBluePixelComponent(q));
+ pixel=QuantumScale*(GetPixelBlue(p)-(double)
+ GetPixelBlue(q));
similarity+=pixel*pixel;
if ((image->matte != MagickFalse) && (reference->matte != MagickFalse))
{
- pixel=QuantumScale*(GetOpacityPixelComponent(p)-(double)
- GetOpacityPixelComponent(q));
+ pixel=QuantumScale*(GetPixelOpacity(p)-(double)
+ GetPixelOpacity(q));
similarity+=pixel*pixel;
}
if ((image->colorspace == CMYKColorspace) &&
(reference->colorspace == CMYKColorspace))
{
- pixel=QuantumScale*(GetIndexPixelComponent(indexes+x)-(double)
- GetIndexPixelComponent(reference_indexes+x));
+ pixel=QuantumScale*(GetPixelIndex(indexes+x)-(double)
+ GetPixelIndex(reference_indexes+x));
similarity+=pixel*pixel;
}
p++;
register MagickRealType
distance;
- if ((fuzz == 0.0) && (GetRedPixelComponent(p) == GetRedPixelComponent(q)) &&
- (GetGreenPixelComponent(p) == GetGreenPixelComponent(q)) &&
- (GetBluePixelComponent(p) == GetBluePixelComponent(q)))
+ if ((fuzz == 0.0) && (GetPixelRed(p) == GetPixelRed(q)) &&
+ (GetPixelGreen(p) == GetPixelGreen(q)) &&
+ (GetPixelBlue(p) == GetPixelBlue(q)))
return(MagickTrue);
- pixel.red=GetRedPixelComponent(p)-(MagickRealType) GetRedPixelComponent(q);
+ pixel.red=GetPixelRed(p)-(MagickRealType) GetPixelRed(q);
distance=pixel.red*pixel.red;
if (distance > (fuzz*fuzz))
return(MagickFalse);
- pixel.green=GetGreenPixelComponent(p)-(MagickRealType)
- GetGreenPixelComponent(q);
+ pixel.green=GetPixelGreen(p)-(MagickRealType)
+ GetPixelGreen(q);
distance+=pixel.green*pixel.green;
if (distance > (fuzz*fuzz))
return(MagickFalse);
- pixel.blue=GetBluePixelComponent(p)-(MagickRealType) GetBluePixelComponent(q);
+ pixel.blue=GetPixelBlue(p)-(MagickRealType) GetPixelBlue(q);
distance+=pixel.blue*pixel.blue;
if (distance > (fuzz*fuzz))
return(MagickFalse);
alpha[i]=1.0;
if (image->matte != MagickFalse)
{
- alpha[i]=QuantumScale*((MagickRealType) GetAlphaPixelComponent(p));
+ alpha[i]=QuantumScale*((MagickRealType) GetPixelAlpha(p));
pixels[i].red*=alpha[i];
pixels[i].green*=alpha[i];
pixels[i].blue*=alpha[i];
alpha[i]=1.0;
if (image->matte != MagickFalse)
{
- alpha[i]=QuantumScale*((MagickRealType) GetAlphaPixelComponent(p));
+ alpha[i]=QuantumScale*((MagickRealType) GetPixelAlpha(p));
pixels[i].red*=alpha[i];
pixels[i].green*=alpha[i];
pixels[i].blue*=alpha[i];
alpha[i]=1.0;
if (image->matte != MagickFalse)
{
- alpha[i]=QuantumScale*((MagickRealType) GetAlphaPixelComponent(p));
+ alpha[i]=QuantumScale*((MagickRealType) GetPixelAlpha(p));
pixels[i].red*=alpha[i];
pixels[i].green*=alpha[i];
pixels[i].blue*=alpha[i];
alpha[i]=1.0;
if (image->matte != MagickFalse)
{
- alpha[i]=QuantumScale*((MagickRealType) GetAlphaPixelComponent(p));
+ alpha[i]=QuantumScale*((MagickRealType) GetPixelAlpha(p));
pixels[i].red*=alpha[i];
pixels[i].green*=alpha[i];
pixels[i].blue*=alpha[i];
if (image->matte != MagickFalse)
{
alpha[n]=QuantumScale*((MagickRealType)
- GetAlphaPixelComponent(p));
+ GetPixelAlpha(p));
pixels[n].red*=alpha[n];
pixels[n].green*=alpha[n];
pixels[n].blue*=alpha[n];
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(p) != OpaqueOpacity)
+ if (GetPixelOpacity(p) != OpaqueOpacity)
q->opacity=opacity;
p++;
q++;
else if (order == 4)
threshold=(MagickRealType) QuantumRange*o4[(x%4)+4*(y%4)];
index=(IndexPacket) (intensity <= threshold ? 0 : 1);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
}
threshold=(MagickRealType) QuantumRange*o3[(x%3)+3*(y%3)];
else if (order == 4)
threshold=(MagickRealType) QuantumRange*o4[(x%4)+4*(y%4)]/1.7;
- SetOpacityPixelComponent(q,(MagickRealType) q->opacity <=
+ SetPixelOpacity(q,(MagickRealType) q->opacity <=
threshold ? 0 : QuantumRange);
q++;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRGBOPixelComponents(q,&background_color);
+ SetPixelRGBO(q,&background_color);
q++;
}
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,0);
+ SetPixelIndex(indexes+x,0);
if (SyncAuthenticPixels(image,&image->exception) == MagickFalse)
break;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRGBOPixelComponents(q,&background_color);
+ SetPixelRGBO(q,&background_color);
q++;
}
if (SyncAuthenticPixels(image,&image->exception) == MagickFalse)
{
index=(IndexPacket) ((MagickRealType) PixelIntensityToQuantum(q) <=
threshold ? 0 : 1);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
if (!SyncAuthenticPixels(image,&image->exception))
{
index=(IndexPacket) ((MagickRealType)
PixelIntensityToQuantum(q) <= pixel.red ? 0 : 1);
- SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRed(q,image->colormap[(ssize_t) index].red);
+ SetPixelGreen(q,image->colormap[(ssize_t) index].green);
+ SetPixelBlue(q,image->colormap[(ssize_t) index].blue);
q++;
}
else
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,(MagickRealType) q->red <= pixel.red
+ SetPixelRed(q,(MagickRealType) q->red <= pixel.red
? 0 : QuantumRange);
- SetGreenPixelComponent(q,(MagickRealType) q->green <= pixel.green
+ SetPixelGreen(q,(MagickRealType) q->green <= pixel.green
? 0 : QuantumRange);
- SetBluePixelComponent(q,(MagickRealType) q->blue <= pixel.blue
+ SetPixelBlue(q,(MagickRealType) q->blue <= pixel.blue
? 0 : QuantumRange);
- SetOpacityPixelComponent(q,(MagickRealType) q->opacity <= pixel.opacity
+ SetPixelOpacity(q,(MagickRealType) q->opacity <= pixel.opacity
? 0 : QuantumRange);
q++;
}
ScaleFilter( resample_filter[id],
cx*cx, 0.0, s.y*cx/coeff[1], cx );
#if 1
-//if ( i == 0 && j == 0 ) {
+/*if ( i == 0 && j == 0 ) {*/
if ( d.x == 0.5 && d.y == 0.5 ) {
fprintf(stderr, "x=%lf y=%lf u=%lf v=%lf\n", d.x*coeff[1], d.y, s.x, s.y);
fprintf(stderr, "radius = %lf phi = %lf validity = %lf\n",
return(polygon_info);
}
-static MagickRealType GetPixelOpacity(PolygonInfo *polygon_info,
+static MagickRealType GetOpacityPixel(PolygonInfo *polygon_info,
const MagickRealType mid,const MagickBooleanType fill,
const FillRule fill_rule,const double x,const double y,
MagickRealType *stroke_opacity)
/*
Fill and/or stroke.
*/
- fill_opacity=GetPixelOpacity(polygon_info[id],mid,fill,
+ fill_opacity=GetOpacityPixel(polygon_info[id],mid,fill,
draw_info->fill_rule,(double) x,(double) y,&stroke_opacity);
if (draw_info->stroke_antialias == MagickFalse)
{
if (q == (PixelPacket *) NULL)
break;
(void) GetFillColor(draw_info,x,y,&pixel);
- SetOpacityPixelComponent(q,pixel.opacity);
+ SetPixelOpacity(q,pixel.opacity);
(void) SyncCacheViewAuthenticPixels(image_view,exception);
break;
}
continue;
}
(void) GetFillColor(draw_info,x,y,&pixel);
- SetOpacityPixelComponent(q,pixel.opacity);
+ SetPixelOpacity(q,pixel.opacity);
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
for (x=0; x < (ssize_t) image->columns; x++)
{
(void) GetFillColor(draw_info,x,y,&pixel);
- SetOpacityPixelComponent(q,pixel.opacity);
+ SetPixelOpacity(q,pixel.opacity);
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
alpha=1.0;
if (((channel & OpacityChannel) != 0) &&
(image->matte != MagickFalse))
- alpha=(MagickRealType) (QuantumScale*GetAlphaPixelComponent(p));
+ alpha=(MagickRealType) (QuantumScale*GetPixelAlpha(p));
if ((channel & RedChannel) != 0)
- pixel.red+=(*k)*alpha*GetRedPixelComponent(p);
+ pixel.red+=(*k)*alpha*GetPixelRed(p);
if ((channel & GreenChannel) != 0)
- pixel.green+=(*k)*alpha*GetGreenPixelComponent(p);
+ pixel.green+=(*k)*alpha*GetPixelGreen(p);
if ((channel & BlueChannel) != 0)
- pixel.blue+=(*k)*alpha*GetBluePixelComponent(p);
+ pixel.blue+=(*k)*alpha*GetPixelBlue(p);
if ((channel & OpacityChannel) != 0)
- pixel.opacity+=(*k)*GetOpacityPixelComponent(p);
+ pixel.opacity+=(*k)*GetPixelOpacity(p);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- pixel.index+=(*k)*alpha*GetIndexPixelComponent(indexes+x+(width-i)*
- v+u);
+ pixel.index+=(*k)*alpha*GetPixelIndex(indexes+x+(width-i)*v+u);
gamma+=(*k)*alpha;
k++;
p++;
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(gamma*pixel.red));
+ SetPixelRed(q,ClampToQuantum(gamma*pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(gamma*pixel.green));
+ SetPixelGreen(q,ClampToQuantum(gamma*pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(gamma*pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(gamma*pixel.blue));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(blur_indexes+x,ClampToQuantum(gamma*
- pixel.index));
+ SetPixelIndex(blur_indexes+x,ClampToQuantum(gamma*pixel.index));
q++;
r++;
}
alpha=1.0;
if (((channel & OpacityChannel) != 0) &&
(image->matte != MagickFalse))
- alpha=(MagickRealType) (QuantumScale*GetAlphaPixelComponent(p));
+ alpha=(MagickRealType) (QuantumScale*GetPixelAlpha(p));
if ((channel & RedChannel) != 0)
- pixel.red+=(*k)*alpha*GetRedPixelComponent(p);
+ pixel.red+=(*k)*alpha*GetPixelRed(p);
if ((channel & GreenChannel) != 0)
- pixel.green+=(*k)*alpha*GetGreenPixelComponent(p);
+ pixel.green+=(*k)*alpha*GetPixelGreen(p);
if ((channel & BlueChannel) != 0)
- pixel.blue+=(*k)*alpha*GetBluePixelComponent(p);
+ pixel.blue+=(*k)*alpha*GetPixelBlue(p);
if ((channel & OpacityChannel) != 0)
- pixel.opacity+=(*k)*GetOpacityPixelComponent(p);
+ pixel.opacity+=(*k)*GetPixelOpacity(p);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- pixel.index+=(*k)*alpha*GetIndexPixelComponent(indexes+x+(width-i)*
- v+u);
+ pixel.index+=(*k)*alpha*GetPixelIndex(indexes+x+(width-i)*v+u);
gamma+=(*k)*alpha;
k++;
p++;
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(gamma*pixel.red));
+ SetPixelRed(q,ClampToQuantum(gamma*pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(gamma*pixel.green));
+ SetPixelGreen(q,ClampToQuantum(gamma*pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(gamma*pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(gamma*pixel.blue));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(sharp_indexes+x,ClampToQuantum(gamma*
- pixel.index));
+ SetPixelIndex(sharp_indexes+x,ClampToQuantum(gamma*pixel.index));
q++;
r++;
}
{
for (i=0; i < (ssize_t) width; i++)
{
- pixel.red+=(*k)*GetRedPixelComponent(kernel_pixels);
- pixel.green+=(*k)*GetGreenPixelComponent(kernel_pixels);
- pixel.blue+=(*k)*GetBluePixelComponent(kernel_pixels);
+ pixel.red+=(*k)*GetPixelRed(kernel_pixels);
+ pixel.green+=(*k)*GetPixelGreen(kernel_pixels);
+ pixel.blue+=(*k)*GetPixelBlue(kernel_pixels);
k++;
kernel_pixels++;
}
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
+ SetPixelRed(q,ClampToQuantum(pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
if ((channel & OpacityChannel) != 0)
{
k=kernel;
kernel_pixels=p;
for (i=0; i < (ssize_t) width; i++)
{
- pixel.opacity+=(*k)*GetOpacityPixelComponent(kernel_pixels);
+ pixel.opacity+=(*k)*GetPixelOpacity(kernel_pixels);
k++;
kernel_pixels++;
}
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
kernel_indexes=indexes;
for (i=0; i < (ssize_t) width; i++)
{
- pixel.index+=(*k)*GetIndexPixelComponent(kernel_indexes);
+ pixel.index+=(*k)*GetPixelIndex(kernel_indexes);
k++;
kernel_indexes++;
}
- SetIndexPixelComponent(blur_indexes+x,ClampToQuantum(
- pixel.index));
+ SetPixelIndex(blur_indexes+x,ClampToQuantum(pixel.index));
}
}
else
gamma=0.0;
for (i=0; i < (ssize_t) width; i++)
{
- alpha=(MagickRealType) (QuantumScale*
- GetAlphaPixelComponent(kernel_pixels));
- pixel.red+=(*k)*alpha*GetRedPixelComponent(kernel_pixels);
- pixel.green+=(*k)*alpha*GetGreenPixelComponent(kernel_pixels);
- pixel.blue+=(*k)*alpha*GetBluePixelComponent(kernel_pixels);
+ alpha=(MagickRealType) (QuantumScale*GetPixelAlpha(kernel_pixels));
+ pixel.red+=(*k)*alpha*GetPixelRed(kernel_pixels);
+ pixel.green+=(*k)*alpha*GetPixelGreen(kernel_pixels);
+ pixel.blue+=(*k)*alpha*GetPixelBlue(kernel_pixels);
gamma+=(*k)*alpha;
k++;
kernel_pixels++;
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(gamma*pixel.red));
+ SetPixelRed(q,ClampToQuantum(gamma*pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(gamma*pixel.green));
+ SetPixelGreen(q,ClampToQuantum(gamma*pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(gamma*pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(gamma*pixel.blue));
if ((channel & OpacityChannel) != 0)
{
k=kernel;
kernel_pixels=p;
for (i=0; i < (ssize_t) width; i++)
{
- pixel.opacity+=(*k)*GetOpacityPixelComponent(kernel_pixels);
+ pixel.opacity+=(*k)*GetPixelOpacity(kernel_pixels);
k++;
kernel_pixels++;
}
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
for (i=0; i < (ssize_t) width; i++)
{
alpha=(MagickRealType) (QuantumScale*
- GetAlphaPixelComponent(kernel_pixels));
+ GetPixelAlpha(kernel_pixels));
pixel.index+=(*k)*alpha*(*kernel_indexes);
k++;
kernel_pixels++;
kernel_indexes++;
}
- SetIndexPixelComponent(blur_indexes+x,ClampToQuantum(gamma*
- pixel.index));
+ SetPixelIndex(blur_indexes+x,ClampToQuantum(gamma*pixel.index));
}
}
indexes++;
{
for (i=0; i < (ssize_t) width; i++)
{
- pixel.red+=(*k)*GetRedPixelComponent(kernel_pixels);
- pixel.green+=(*k)*GetGreenPixelComponent(kernel_pixels);
- pixel.blue+=(*k)*GetBluePixelComponent(kernel_pixels);
+ pixel.red+=(*k)*GetPixelRed(kernel_pixels);
+ pixel.green+=(*k)*GetPixelGreen(kernel_pixels);
+ pixel.blue+=(*k)*GetPixelBlue(kernel_pixels);
k++;
kernel_pixels++;
}
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
+ SetPixelRed(q,ClampToQuantum(pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
if ((channel & OpacityChannel) != 0)
{
k=kernel;
kernel_pixels=p;
for (i=0; i < (ssize_t) width; i++)
{
- pixel.opacity+=(*k)*GetOpacityPixelComponent(kernel_pixels);
+ pixel.opacity+=(*k)*GetPixelOpacity(kernel_pixels);
k++;
kernel_pixels++;
}
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
kernel_indexes=indexes;
for (i=0; i < (ssize_t) width; i++)
{
- pixel.index+=(*k)*GetIndexPixelComponent(kernel_indexes);
+ pixel.index+=(*k)*GetPixelIndex(kernel_indexes);
k++;
kernel_indexes++;
}
- SetIndexPixelComponent(blur_indexes+y,ClampToQuantum(
- pixel.index));
+ SetPixelIndex(blur_indexes+y,ClampToQuantum(pixel.index));
}
}
else
for (i=0; i < (ssize_t) width; i++)
{
alpha=(MagickRealType) (QuantumScale*
- GetAlphaPixelComponent(kernel_pixels));
- pixel.red+=(*k)*alpha*GetRedPixelComponent(kernel_pixels);
- pixel.green+=(*k)*alpha*GetGreenPixelComponent(kernel_pixels);
- pixel.blue+=(*k)*alpha*GetBluePixelComponent(kernel_pixels);
+ GetPixelAlpha(kernel_pixels));
+ pixel.red+=(*k)*alpha*GetPixelRed(kernel_pixels);
+ pixel.green+=(*k)*alpha*GetPixelGreen(kernel_pixels);
+ pixel.blue+=(*k)*alpha*GetPixelBlue(kernel_pixels);
gamma+=(*k)*alpha;
k++;
kernel_pixels++;
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(gamma*pixel.red));
+ SetPixelRed(q,ClampToQuantum(gamma*pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(gamma*pixel.green));
+ SetPixelGreen(q,ClampToQuantum(gamma*pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(gamma*pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(gamma*pixel.blue));
if ((channel & OpacityChannel) != 0)
{
k=kernel;
kernel_pixels=p;
for (i=0; i < (ssize_t) width; i++)
{
- pixel.opacity+=(*k)*GetOpacityPixelComponent(kernel_pixels);
+ pixel.opacity+=(*k)*GetPixelOpacity(kernel_pixels);
k++;
kernel_pixels++;
}
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
for (i=0; i < (ssize_t) width; i++)
{
alpha=(MagickRealType) (QuantumScale*
- GetAlphaPixelComponent(kernel_pixels));
+ GetPixelAlpha(kernel_pixels));
pixel.index+=(*k)*alpha*(*kernel_indexes);
k++;
kernel_pixels++;
kernel_indexes++;
}
- SetIndexPixelComponent(blur_indexes+y,ClampToQuantum(gamma*
- pixel.index));
+ SetPixelIndex(blur_indexes+y,ClampToQuantum(gamma*pixel.index));
}
}
indexes++;
kernel_pixels+=image->columns+width;
}
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
+ SetPixelRed(q,ClampToQuantum(pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
if ((channel & OpacityChannel) != 0)
{
k=normal_kernel;
}
kernel_pixels+=image->columns+width;
}
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
{
for (u=0; u < (ssize_t) width; u++)
{
- pixel.index+=(*k)*GetIndexPixelComponent(kernel_indexes+u);
+ pixel.index+=(*k)*GetPixelIndex(kernel_indexes+u);
k++;
}
kernel_indexes+=image->columns+width;
}
- SetIndexPixelComponent(convolve_indexes+x,ClampToQuantum(
- pixel.index));
+ SetPixelIndex(convolve_indexes+x,ClampToQuantum(pixel.index));
}
}
else
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(gamma*pixel.red));
+ SetPixelRed(q,ClampToQuantum(gamma*pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(gamma*pixel.green));
+ SetPixelGreen(q,ClampToQuantum(gamma*pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(gamma*pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(gamma*pixel.blue));
if ((channel & OpacityChannel) != 0)
{
k=normal_kernel;
{
for (u=0; u < (ssize_t) width; u++)
{
- pixel.opacity+=(*k)*GetOpacityPixelComponent(kernel_pixels+u);
+ pixel.opacity+=(*k)*GetPixelOpacity(kernel_pixels+u);
k++;
}
kernel_pixels+=image->columns+width;
}
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
{
alpha=(MagickRealType) (QuantumScale*(QuantumRange-
kernel_pixels[u].opacity));
- pixel.index+=(*k)*alpha*GetIndexPixelComponent(
+ pixel.index+=(*k)*alpha*GetPixelIndex(
kernel_indexes+u);
k++;
}
kernel_pixels+=image->columns+width;
kernel_indexes+=image->columns+width;
}
- SetIndexPixelComponent(convolve_indexes+x,ClampToQuantum(gamma*
+ SetPixelIndex(convolve_indexes+x,ClampToQuantum(gamma*
pixel.index));
}
}
{
switch (i)
{
- case 0: pixel[j]=GetRedPixelComponent(p); break;
- case 1: pixel[j]=GetGreenPixelComponent(p); break;
- case 2: pixel[j]=GetBluePixelComponent(p); break;
- case 3: pixel[j]=GetOpacityPixelComponent(p); break;
- case 4: pixel[j]=GetBlackPixelComponent(indexes+x); break;
+ case 0: pixel[j]=GetPixelRed(p); break;
+ case 1: pixel[j]=GetPixelGreen(p); break;
+ case 2: pixel[j]=GetPixelBlue(p); break;
+ case 3: pixel[j]=GetPixelOpacity(p); break;
+ case 4: pixel[j]=GetPixelBlack(indexes+x); break;
default: break;
}
p++;
{
switch (i)
{
- case 0: SetRedPixelComponent(q,pixel[j]); break;
- case 1: SetGreenPixelComponent(q,pixel[j]); break;
- case 2: SetBluePixelComponent(q,pixel[j]); break;
- case 3: SetOpacityPixelComponent(q,pixel[j]); break;
- case 4: SetIndexPixelComponent(indexes+x,pixel[j]); break;
+ case 0: SetPixelRed(q,pixel[j]); break;
+ case 1: SetPixelGreen(q,pixel[j]); break;
+ case 2: SetPixelBlue(q,pixel[j]); break;
+ case 3: SetPixelOpacity(q,pixel[j]); break;
+ case 4: SetPixelIndex(indexes+x,pixel[j]); break;
default: break;
}
q++;
kernel_pixels+=image->columns+kernel->width;
}
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
+ SetPixelRed(q,ClampToQuantum(pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
if ((channel & OpacityChannel) != 0)
{
k=kernel->values;
}
kernel_pixels+=image->columns+kernel->width;
}
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
{
for (u=0; u < (ssize_t) kernel->height; u++)
{
- pixel.index+=(*k)*GetIndexPixelComponent(kernel_indexes+u);
+ pixel.index+=(*k)*GetPixelIndex(kernel_indexes+u);
k++;
}
kernel_indexes+=image->columns+kernel->width;
}
- SetIndexPixelComponent(filter_indexes+x,ClampToQuantum(
- pixel.index));
+ SetPixelIndex(filter_indexes+x,ClampToQuantum(pixel.index));
}
}
else
for (u=0; u < (ssize_t) kernel->height; u++)
{
alpha=(MagickRealType) (QuantumScale*(QuantumRange-
- GetOpacityPixelComponent(kernel_pixels+u)));
- pixel.red+=(*k)*alpha*GetRedPixelComponent(kernel_pixels+u);
- pixel.green+=(*k)*alpha*GetGreenPixelComponent(kernel_pixels+u);
- pixel.blue+=(*k)*alpha*GetBluePixelComponent(kernel_pixels+u);
+ GetPixelOpacity(kernel_pixels+u)));
+ pixel.red+=(*k)*alpha*GetPixelRed(kernel_pixels+u);
+ pixel.green+=(*k)*alpha*GetPixelGreen(kernel_pixels+u);
+ pixel.blue+=(*k)*alpha*GetPixelBlue(kernel_pixels+u);
gamma+=(*k)*alpha;
k++;
}
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(gamma*pixel.red));
+ SetPixelRed(q,ClampToQuantum(gamma*pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(gamma*pixel.green));
+ SetPixelGreen(q,ClampToQuantum(gamma*pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(gamma*pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(gamma*pixel.blue));
if ((channel & OpacityChannel) != 0)
{
k=kernel->values;
{
for (u=0; u < (ssize_t) kernel->height; u++)
{
- pixel.opacity+=(*k)*GetOpacityPixelComponent(kernel_pixels+u);
+ pixel.opacity+=(*k)*GetPixelOpacity(kernel_pixels+u);
k++;
}
kernel_pixels+=image->columns+kernel->width;
}
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
{
alpha=(MagickRealType) (QuantumScale*(QuantumRange-
kernel_pixels[u].opacity));
- pixel.index+=(*k)*alpha*GetIndexPixelComponent(
- kernel_indexes+u);
+ pixel.index+=(*k)*alpha*GetPixelIndex(kernel_indexes+u);
k++;
}
kernel_pixels+=image->columns+kernel->width;
kernel_indexes+=image->columns+kernel->width;
}
- SetIndexPixelComponent(filter_indexes+x,ClampToQuantum(gamma*
- pixel.index));
+ SetPixelIndex(filter_indexes+x,ClampToQuantum(gamma*pixel.index));
}
}
indexes++;
k++;
}
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(qixel.red));
+ SetPixelRed(q,ClampToQuantum(qixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(qixel.green));
+ SetPixelGreen(q,ClampToQuantum(qixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(qixel.blue));
+ SetPixelBlue(q,ClampToQuantum(qixel.blue));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToQuantum(qixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(qixel.opacity));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(blur_indexes+x,ClampToQuantum(qixel.index));
+ SetPixelIndex(blur_indexes+x,ClampToQuantum(qixel.index));
}
else
{
{
(void) GetOneCacheViewVirtualPixel(image_view,x+offset[i].x,y+
offset[i].y,&pixel,exception);
- alpha=(MagickRealType) (QuantumScale*
- GetAlphaPixelComponent(&pixel));
+ alpha=(MagickRealType) (QuantumScale*GetPixelAlpha(&pixel));
qixel.red+=(*k)*alpha*pixel.red;
qixel.green+=(*k)*alpha*pixel.green;
qixel.blue+=(*k)*alpha*pixel.blue;
if (image->colorspace == CMYKColorspace)
{
indexes=GetCacheViewVirtualIndexQueue(image_view);
- qixel.index+=(*k)*alpha*GetIndexPixelComponent(indexes);
+ qixel.index+=(*k)*alpha*GetPixelIndex(indexes);
}
gamma+=(*k)*alpha;
k++;
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(gamma*qixel.red));
+ SetPixelRed(q,ClampToQuantum(gamma*qixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(gamma*qixel.green));
+ SetPixelGreen(q,ClampToQuantum(gamma*qixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(gamma*qixel.blue));
+ SetPixelBlue(q,ClampToQuantum(gamma*qixel.blue));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToQuantum(qixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(qixel.opacity));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(blur_indexes+x,ClampToQuantum(gamma*
- qixel.index));
+ SetPixelIndex(blur_indexes+x,ClampToQuantum(gamma*qixel.index));
}
q++;
}
normalize=1.0/(fabs((double) normalize) <= MagickEpsilon ? 1.0 :
normalize);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(normalize*qixel.red));
+ SetPixelRed(q,ClampToQuantum(normalize*qixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(normalize*qixel.green));
+ SetPixelGreen(q,ClampToQuantum(normalize*qixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(normalize*qixel.blue));
+ SetPixelBlue(q,ClampToQuantum(normalize*qixel.blue));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToQuantum(normalize*qixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(normalize*qixel.opacity));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(blur_indexes+x,ClampToQuantum(normalize*
- qixel.index));
+ SetPixelIndex(blur_indexes+x,ClampToQuantum(normalize*qixel.index));
}
else
{
(ssize_t) (blur_center.y+center.x*sin_theta[i]+center.y*
cos_theta[i]+0.5),&pixel,exception);
alpha=(MagickRealType) (QuantumScale*
- GetAlphaPixelComponent(&pixel));
+ GetPixelAlpha(&pixel));
qixel.red+=alpha*pixel.red;
qixel.green+=alpha*pixel.green;
qixel.blue+=alpha*pixel.blue;
normalize=1.0/(fabs((double) normalize) <= MagickEpsilon ? 1.0 :
normalize);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(gamma*qixel.red));
+ SetPixelRed(q,ClampToQuantum(gamma*qixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(gamma*qixel.green));
+ SetPixelGreen(q,ClampToQuantum(gamma*qixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(gamma*qixel.blue));
+ SetPixelBlue(q,ClampToQuantum(gamma*qixel.blue));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToQuantum(normalize*qixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(normalize*qixel.opacity));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(blur_indexes+x,ClampToQuantum(gamma*
- qixel.index));
+ SetPixelIndex(blur_indexes+x,ClampToQuantum(gamma*qixel.index));
}
q++;
}
{
if (SelectiveContrast(p+u+j,q,threshold) != MagickFalse)
{
- pixel.red+=(*k)*GetRedPixelComponent(p+u+j);
- pixel.green+=(*k)*GetGreenPixelComponent(p+u+j);
- pixel.blue+=(*k)*GetBluePixelComponent(p+u+j);
+ pixel.red+=(*k)*GetPixelRed(p+u+j);
+ pixel.green+=(*k)*GetPixelGreen(p+u+j);
+ pixel.blue+=(*k)*GetPixelBlue(p+u+j);
gamma+=(*k);
k++;
}
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(gamma*pixel.red));
+ SetPixelRed(q,ClampToQuantum(gamma*pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(gamma*pixel.green));
+ SetPixelGreen(q,ClampToQuantum(gamma*pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(gamma*pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(gamma*pixel.blue));
}
if ((channel & OpacityChannel) != 0)
{
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 :
gamma);
- SetOpacityPixelComponent(q,ClampToQuantum(gamma*
- pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(gamma*pixel.opacity));
}
}
if (((channel & IndexChannel) != 0) &&
{
if (SelectiveContrast(p+u+j,q,threshold) != MagickFalse)
{
- pixel.index+=(*k)*GetIndexPixelComponent(indexes+x+u+j);
+ pixel.index+=(*k)*GetPixelIndex(indexes+x+u+j);
gamma+=(*k);
k++;
}
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 :
gamma);
- SetIndexPixelComponent(blur_indexes+x,ClampToQuantum(gamma*
+ SetPixelIndex(blur_indexes+x,ClampToQuantum(gamma*
pixel.index));
}
}
{
if (SelectiveContrast(p+u+j,q,threshold) != MagickFalse)
{
- alpha=(MagickRealType) (QuantumScale*
- GetAlphaPixelComponent(p+u+j));
- pixel.red+=(*k)*alpha*GetRedPixelComponent(p+u+j);
- pixel.green+=(*k)*alpha*GetGreenPixelComponent(p+u+j);
- pixel.blue+=(*k)*alpha*GetBluePixelComponent(p+u+j);
- pixel.opacity+=(*k)*GetOpacityPixelComponent(p+u+j);
+ alpha=(MagickRealType) (QuantumScale*GetPixelAlpha(p+u+j));
+ pixel.red+=(*k)*alpha*GetPixelRed(p+u+j);
+ pixel.green+=(*k)*alpha*GetPixelGreen(p+u+j);
+ pixel.blue+=(*k)*alpha*GetPixelBlue(p+u+j);
+ pixel.opacity+=(*k)*GetPixelOpacity(p+u+j);
gamma+=(*k)*alpha;
k++;
}
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(gamma*pixel.red));
+ SetPixelRed(q,ClampToQuantum(gamma*pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(gamma*pixel.green));
+ SetPixelGreen(q,ClampToQuantum(gamma*pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(gamma*pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(gamma*pixel.blue));
}
if ((channel & OpacityChannel) != 0)
{
{
if (SelectiveContrast(p+u+j,q,threshold) != MagickFalse)
{
- pixel.opacity+=(*k)*GetOpacityPixelComponent(p+u+j);
+ pixel.opacity+=(*k)*GetPixelOpacity(p+u+j);
gamma+=(*k);
k++;
}
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 :
gamma);
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
}
}
if (((channel & IndexChannel) != 0) &&
if (SelectiveContrast(p+u+j,q,threshold) != MagickFalse)
{
alpha=(MagickRealType) (QuantumScale*
- GetAlphaPixelComponent(p+u+j));
- pixel.index+=(*k)*alpha*GetIndexPixelComponent(indexes+x+
- u+j);
+ GetPixelAlpha(p+u+j));
+ pixel.index+=(*k)*alpha*GetPixelIndex(indexes+x+u+j);
gamma+=(*k);
k++;
}
{
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 :
gamma);
- SetIndexPixelComponent(blur_indexes+x,ClampToQuantum(gamma*
+ SetPixelIndex(blur_indexes+x,ClampToQuantum(gamma*
pixel.index));
}
}
}
if (gray != MagickFalse)
{
- SetRedPixelComponent(q,shade);
- SetGreenPixelComponent(q,shade);
- SetBluePixelComponent(q,shade);
+ SetPixelRed(q,shade);
+ SetPixelGreen(q,shade);
+ SetPixelBlue(q,shade);
}
else
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumScale*shade*
- GetRedPixelComponent(s1)));
- SetGreenPixelComponent(q,ClampToQuantum(QuantumScale*shade*
- GetGreenPixelComponent(s1)));
- SetBluePixelComponent(q,ClampToQuantum(QuantumScale*shade*
- GetBluePixelComponent(s1)));
+ SetPixelRed(q,ClampToQuantum(QuantumScale*shade*GetPixelRed(s1)));
+ SetPixelGreen(q,ClampToQuantum(QuantumScale*shade*GetPixelGreen(s1)));
+ SetPixelBlue(q,ClampToQuantum(QuantumScale*shade*GetPixelBlue(s1)));
}
q->opacity=s1->opacity;
s0++;
unsigned short
index;
- index=ScaleQuantumToShort(GetRedPixelComponent(pixel));
+ index=ScaleQuantumToShort(GetPixelRed(pixel));
signature=pixel_list->lists[0].nodes[index].signature;
if (signature == pixel_list->signature)
pixel_list->lists[0].nodes[index].count++;
else
AddNodePixelList(pixel_list,0,index);
- index=ScaleQuantumToShort(GetGreenPixelComponent(pixel));
+ index=ScaleQuantumToShort(GetPixelGreen(pixel));
signature=pixel_list->lists[1].nodes[index].signature;
if (signature == pixel_list->signature)
pixel_list->lists[1].nodes[index].count++;
else
AddNodePixelList(pixel_list,1,index);
- index=ScaleQuantumToShort(GetBluePixelComponent(pixel));
+ index=ScaleQuantumToShort(GetPixelBlue(pixel));
signature=pixel_list->lists[2].nodes[index].signature;
if (signature == pixel_list->signature)
pixel_list->lists[2].nodes[index].count++;
else
AddNodePixelList(pixel_list,2,index);
- index=ScaleQuantumToShort(GetOpacityPixelComponent(pixel));
+ index=ScaleQuantumToShort(GetPixelOpacity(pixel));
signature=pixel_list->lists[3].nodes[index].signature;
if (signature == pixel_list->signature)
pixel_list->lists[3].nodes[index].count++;
else
AddNodePixelList(pixel_list,3,index);
if (image->colorspace == CMYKColorspace)
- index=ScaleQuantumToShort(GetIndexPixelComponent(indexes));
+ index=ScaleQuantumToShort(GetPixelIndex(indexes));
signature=pixel_list->lists[4].nodes[index].signature;
if (signature == pixel_list->signature)
pixel_list->lists[4].nodes[index].count++;
}
}
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
+ SetPixelRed(q,ClampToQuantum(pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
if (((channel & OpacityChannel) != 0) &&
(image->matte != MagickFalse))
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(statistic_indexes+x,ClampToQuantum(pixel.index));
+ SetPixelIndex(statistic_indexes+x,ClampToQuantum(pixel.index));
p++;
q++;
}
{
if ((channel & RedChannel) != 0)
{
- pixel.red=GetRedPixelComponent(p)-(MagickRealType)
- GetRedPixelComponent(q);
+ pixel.red=GetPixelRed(p)-(MagickRealType) GetPixelRed(q);
if (fabs(2.0*pixel.red) < quantum_threshold)
- pixel.red=(MagickRealType) GetRedPixelComponent(p);
+ pixel.red=(MagickRealType) GetPixelRed(p);
else
- pixel.red=(MagickRealType) GetRedPixelComponent(p)+
- (pixel.red*amount);
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
+ pixel.red=(MagickRealType) GetPixelRed(p)+(pixel.red*amount);
+ SetPixelRed(q,ClampToQuantum(pixel.red));
}
if ((channel & GreenChannel) != 0)
{
- pixel.green=GetGreenPixelComponent(p)-(MagickRealType) q->green;
+ pixel.green=GetPixelGreen(p)-(MagickRealType) q->green;
if (fabs(2.0*pixel.green) < quantum_threshold)
- pixel.green=(MagickRealType) GetGreenPixelComponent(p);
+ pixel.green=(MagickRealType) GetPixelGreen(p);
else
- pixel.green=(MagickRealType) GetGreenPixelComponent(p)+(pixel.green*amount);
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
+ pixel.green=(MagickRealType) GetPixelGreen(p)+(pixel.green*amount);
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
}
if ((channel & BlueChannel) != 0)
{
- pixel.blue=GetBluePixelComponent(p)-(MagickRealType) q->blue;
+ pixel.blue=GetPixelBlue(p)-(MagickRealType) q->blue;
if (fabs(2.0*pixel.blue) < quantum_threshold)
- pixel.blue=(MagickRealType) GetBluePixelComponent(p);
+ pixel.blue=(MagickRealType) GetPixelBlue(p);
else
- pixel.blue=(MagickRealType) GetBluePixelComponent(p)+(pixel.blue*amount);
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
+ pixel.blue=(MagickRealType) GetPixelBlue(p)+(pixel.blue*amount);
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
}
if ((channel & OpacityChannel) != 0)
{
- pixel.opacity=GetOpacityPixelComponent(p)-(MagickRealType) q->opacity;
+ pixel.opacity=GetPixelOpacity(p)-(MagickRealType) q->opacity;
if (fabs(2.0*pixel.opacity) < quantum_threshold)
- pixel.opacity=(MagickRealType) GetOpacityPixelComponent(p);
+ pixel.opacity=(MagickRealType) GetPixelOpacity(p);
else
- pixel.opacity=GetOpacityPixelComponent(p)+(pixel.opacity*amount);
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ pixel.opacity=GetPixelOpacity(p)+(pixel.opacity*amount);
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
{
- pixel.index=GetIndexPixelComponent(indexes+x)-(MagickRealType)
- GetIndexPixelComponent(unsharp_indexes+x);
+ pixel.index=GetPixelIndex(indexes+x)-(MagickRealType)
+ GetPixelIndex(unsharp_indexes+x);
if (fabs(2.0*pixel.index) < quantum_threshold)
- pixel.index=(MagickRealType) GetIndexPixelComponent(indexes+x);
+ pixel.index=(MagickRealType) GetPixelIndex(indexes+x);
else
- pixel.index=(MagickRealType) GetIndexPixelComponent(indexes+x)+
+ pixel.index=(MagickRealType) GetPixelIndex(indexes+x)+
(pixel.index*amount);
- SetIndexPixelComponent(unsharp_indexes+x,ClampToQuantum(pixel.index));
+ SetPixelIndex(unsharp_indexes+x,ClampToQuantum(pixel.index));
}
p++;
q++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- luma=0.2126*GetRedPixelComponent(q)+0.7152*GetGreenPixelComponent(q)+
- 0.0722*GetBluePixelComponent(q);
- SetRedPixelComponent(q,ClampToQuantum(luma+color_correction.saturation*
- (cdl_map[ScaleQuantumToMap(GetRedPixelComponent(q))].red-luma)));
- SetGreenPixelComponent(q,ClampToQuantum(luma+color_correction.saturation*
- (cdl_map[ScaleQuantumToMap(GetGreenPixelComponent(q))].green-luma)));
- SetBluePixelComponent(q,ClampToQuantum(luma+color_correction.saturation*
- (cdl_map[ScaleQuantumToMap(GetBluePixelComponent(q))].blue-luma)));
+ luma=0.2126*GetPixelRed(q)+0.7152*GetPixelGreen(q)+
+ 0.0722*GetPixelBlue(q);
+ SetPixelRed(q,ClampToQuantum(luma+color_correction.saturation*
+ (cdl_map[ScaleQuantumToMap(GetPixelRed(q))].red-luma)));
+ SetPixelGreen(q,ClampToQuantum(luma+color_correction.saturation*
+ (cdl_map[ScaleQuantumToMap(GetPixelGreen(q))].green-luma)));
+ SetPixelBlue(q,ClampToQuantum(luma+color_correction.saturation*
+ (cdl_map[ScaleQuantumToMap(GetPixelBlue(q))].blue-luma)));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
{
SetMagickPixelPacket(image,q,indexes+x,&pixel);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampRedPixelComponent(clut_map+
- ScaleQuantumToMap(GetRedPixelComponent(q))));
+ SetPixelRed(q,ClampPixelRed(clut_map+
+ ScaleQuantumToMap(GetPixelRed(q))));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampGreenPixelComponent(clut_map+
- ScaleQuantumToMap(GetGreenPixelComponent(q))));
+ SetPixelGreen(q,ClampPixelGreen(clut_map+
+ ScaleQuantumToMap(GetPixelGreen(q))));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampBluePixelComponent(clut_map+
- ScaleQuantumToMap(GetBluePixelComponent(q))));
+ SetPixelBlue(q,ClampPixelBlue(clut_map+
+ ScaleQuantumToMap(GetPixelBlue(q))));
if ((channel & OpacityChannel) != 0)
{
if (clut_image->matte == MagickFalse)
- SetAlphaPixelComponent(q,MagickPixelIntensityToQuantum(clut_map+
- ScaleQuantumToMap((Quantum) GetAlphaPixelComponent(q))));
+ SetPixelAlpha(q,MagickPixelIntensityToQuantum(clut_map+
+ ScaleQuantumToMap((Quantum) GetPixelAlpha(q))));
else
if (image->matte == MagickFalse)
- SetOpacityPixelComponent(q,ClampOpacityPixelComponent(clut_map+
+ SetPixelOpacity(q,ClampPixelOpacity(clut_map+
ScaleQuantumToMap((Quantum) MagickPixelIntensity(&pixel))));
else
- SetOpacityPixelComponent(q,ClampOpacityPixelComponent(
- clut_map+ScaleQuantumToMap(GetOpacityPixelComponent(q))));
+ SetPixelOpacity(q,ClampPixelOpacity(
+ clut_map+ScaleQuantumToMap(GetPixelOpacity(q))));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,ClampToQuantum((clut_map+(ssize_t)
- GetIndexPixelComponent(indexes+x))->index));
+ SetPixelIndex(indexes+x,ClampToQuantum((clut_map+(ssize_t)
+ GetPixelIndex(indexes+x))->index));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- red=GetRedPixelComponent(q);
- green=GetGreenPixelComponent(q);
- blue=GetBluePixelComponent(q);
+ red=GetPixelRed(q);
+ green=GetPixelGreen(q);
+ blue=GetPixelBlue(q);
Contrast(sign,&red,&green,&blue);
- SetRedPixelComponent(q,red);
- SetGreenPixelComponent(q,green);
- SetBluePixelComponent(q,blue);
+ SetPixelRed(q,red);
+ SetPixelGreen(q,green);
+ SetPixelBlue(q,blue);
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- histogram[ScaleQuantumToMap(GetRedPixelComponent(p))].red++;
+ histogram[ScaleQuantumToMap(GetPixelRed(p))].red++;
if ((channel & GreenChannel) != 0)
- histogram[ScaleQuantumToMap(GetGreenPixelComponent(p))].green++;
+ histogram[ScaleQuantumToMap(GetPixelGreen(p))].green++;
if ((channel & BlueChannel) != 0)
- histogram[ScaleQuantumToMap(GetBluePixelComponent(p))].blue++;
+ histogram[ScaleQuantumToMap(GetPixelBlue(p))].blue++;
if ((channel & OpacityChannel) != 0)
- histogram[ScaleQuantumToMap(GetOpacityPixelComponent(p))].opacity++;
+ histogram[ScaleQuantumToMap(GetPixelOpacity(p))].opacity++;
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- histogram[ScaleQuantumToMap(GetIndexPixelComponent(
+ histogram[ScaleQuantumToMap(GetPixelIndex(
indexes+x))].index++;
p++;
}
if ((channel & RedChannel) != 0)
{
if (black.red != white.red)
- SetRedPixelComponent(q,ClampToQuantum(stretch_map[
- ScaleQuantumToMap(GetRedPixelComponent(q))].red));
+ SetPixelRed(q,ClampToQuantum(stretch_map[
+ ScaleQuantumToMap(GetPixelRed(q))].red));
}
if ((channel & GreenChannel) != 0)
{
if (black.green != white.green)
- SetGreenPixelComponent(q,ClampToQuantum(stretch_map[
- ScaleQuantumToMap(GetGreenPixelComponent(q))].green));
+ SetPixelGreen(q,ClampToQuantum(stretch_map[
+ ScaleQuantumToMap(GetPixelGreen(q))].green));
}
if ((channel & BlueChannel) != 0)
{
if (black.blue != white.blue)
- SetBluePixelComponent(q,ClampToQuantum(stretch_map[
- ScaleQuantumToMap(GetBluePixelComponent(q))].blue));
+ SetPixelBlue(q,ClampToQuantum(stretch_map[
+ ScaleQuantumToMap(GetPixelBlue(q))].blue));
}
if ((channel & OpacityChannel) != 0)
{
if (black.opacity != white.opacity)
- SetOpacityPixelComponent(q,ClampToQuantum(stretch_map[
- ScaleQuantumToMap(GetOpacityPixelComponent(q))].opacity));
+ SetPixelOpacity(q,ClampToQuantum(stretch_map[
+ ScaleQuantumToMap(GetPixelOpacity(q))].opacity));
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
{
if (black.index != white.index)
- SetIndexPixelComponent(indexes+x,ClampToQuantum(stretch_map[
- ScaleQuantumToMap(GetIndexPixelComponent(indexes+x))].index));
+ SetPixelIndex(indexes+x,ClampToQuantum(stretch_map[
+ ScaleQuantumToMap(GetPixelIndex(indexes+x))].index));
}
q++;
}
MagickExport Image *EnhanceImage(const Image *image,ExceptionInfo *exception)
{
#define Enhance(weight) \
- mean=((MagickRealType) GetRedPixelComponent(r)+pixel.red)/2; \
- distance=(MagickRealType) GetRedPixelComponent(r)-(MagickRealType) pixel.red; \
+ mean=((MagickRealType) GetPixelRed(r)+pixel.red)/2; \
+ distance=(MagickRealType) GetPixelRed(r)-(MagickRealType) pixel.red; \
distance_squared=QuantumScale*(2.0*((MagickRealType) QuantumRange+1.0)+ \
mean)*distance*distance; \
- mean=((MagickRealType) GetGreenPixelComponent(r)+pixel.green)/2; \
- distance=(MagickRealType) GetGreenPixelComponent(r)-(MagickRealType) \
+ mean=((MagickRealType) GetPixelGreen(r)+pixel.green)/2; \
+ distance=(MagickRealType) GetPixelGreen(r)-(MagickRealType) \
pixel.green; \
distance_squared+=4.0*distance*distance; \
- mean=((MagickRealType) GetBluePixelComponent(r)+pixel.blue)/2; \
- distance=(MagickRealType) GetBluePixelComponent(r)-(MagickRealType) \
+ mean=((MagickRealType) GetPixelBlue(r)+pixel.blue)/2; \
+ distance=(MagickRealType) GetPixelBlue(r)-(MagickRealType) \
pixel.blue; \
distance_squared+=QuantumScale*(3.0*((MagickRealType) \
QuantumRange+1.0)-1.0-mean)*distance*distance; \
if (distance_squared < ((MagickRealType) QuantumRange*(MagickRealType) \
QuantumRange/25.0f)) \
{ \
- aggregate.red+=(weight)*GetRedPixelComponent(r); \
- aggregate.green+=(weight)*GetGreenPixelComponent(r); \
- aggregate.blue+=(weight)*GetBluePixelComponent(r); \
- aggregate.opacity+=(weight)*GetOpacityPixelComponent(r); \
+ aggregate.red+=(weight)*GetPixelRed(r); \
+ aggregate.green+=(weight)*GetPixelGreen(r); \
+ aggregate.blue+=(weight)*GetPixelBlue(r); \
+ aggregate.opacity+=(weight)*GetPixelOpacity(r); \
total_weight+=(weight); \
} \
r++;
Enhance(8.0); Enhance(20.0); Enhance(40.0); Enhance(20.0); Enhance(8.0);
r=p+4*(image->columns+4);
Enhance(5.0); Enhance(8.0); Enhance(10.0); Enhance(8.0); Enhance(5.0);
- SetRedPixelComponent(q,(aggregate.red+(total_weight/2)-1)/total_weight);
- SetGreenPixelComponent(q,(aggregate.green+(total_weight/2)-1)/
+ SetPixelRed(q,(aggregate.red+(total_weight/2)-1)/total_weight);
+ SetPixelGreen(q,(aggregate.green+(total_weight/2)-1)/
total_weight);
- SetBluePixelComponent(q,(aggregate.blue+(total_weight/2)-1)/total_weight);
- SetOpacityPixelComponent(q,(aggregate.opacity+(total_weight/2)-1)/
+ SetPixelBlue(q,(aggregate.blue+(total_weight/2)-1)/total_weight);
+ SetPixelOpacity(q,(aggregate.opacity+(total_weight/2)-1)/
total_weight);
p++;
q++;
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- histogram[ScaleQuantumToMap(GetRedPixelComponent(p))].red++;
+ histogram[ScaleQuantumToMap(GetPixelRed(p))].red++;
if ((channel & GreenChannel) != 0)
- histogram[ScaleQuantumToMap(GetGreenPixelComponent(p))].green++;
+ histogram[ScaleQuantumToMap(GetPixelGreen(p))].green++;
if ((channel & BlueChannel) != 0)
- histogram[ScaleQuantumToMap(GetBluePixelComponent(p))].blue++;
+ histogram[ScaleQuantumToMap(GetPixelBlue(p))].blue++;
if ((channel & OpacityChannel) != 0)
- histogram[ScaleQuantumToMap(GetOpacityPixelComponent(p))].opacity++;
+ histogram[ScaleQuantumToMap(GetPixelOpacity(p))].opacity++;
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- histogram[ScaleQuantumToMap(GetIndexPixelComponent(indexes+x))].index++;
+ histogram[ScaleQuantumToMap(GetPixelIndex(indexes+x))].index++;
p++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if (((channel & RedChannel) != 0) && (white.red != black.red))
- SetRedPixelComponent(q,ClampToQuantum(equalize_map[
- ScaleQuantumToMap(GetRedPixelComponent(q))].red));
+ SetPixelRed(q,ClampToQuantum(equalize_map[
+ ScaleQuantumToMap(GetPixelRed(q))].red));
if (((channel & GreenChannel) != 0) && (white.green != black.green))
- SetGreenPixelComponent(q,ClampToQuantum(equalize_map[
- ScaleQuantumToMap(GetGreenPixelComponent(q))].green));
+ SetPixelGreen(q,ClampToQuantum(equalize_map[
+ ScaleQuantumToMap(GetPixelGreen(q))].green));
if (((channel & BlueChannel) != 0) && (white.blue != black.blue))
- SetBluePixelComponent(q,ClampToQuantum(equalize_map[
- ScaleQuantumToMap(GetBluePixelComponent(q))].blue));
+ SetPixelBlue(q,ClampToQuantum(equalize_map[
+ ScaleQuantumToMap(GetPixelBlue(q))].blue));
if (((channel & OpacityChannel) != 0) && (white.opacity != black.opacity))
- SetOpacityPixelComponent(q,ClampToQuantum(equalize_map[
- ScaleQuantumToMap(GetOpacityPixelComponent(q))].opacity));
+ SetPixelOpacity(q,ClampToQuantum(equalize_map[
+ ScaleQuantumToMap(GetPixelOpacity(q))].opacity));
if ((((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace)) &&
(white.index != black.index))
- SetIndexPixelComponent(indexes+x,ClampToQuantum(equalize_map[
- ScaleQuantumToMap(GetIndexPixelComponent(indexes+x))].index));
+ SetPixelIndex(indexes+x,ClampToQuantum(equalize_map[
+ ScaleQuantumToMap(GetPixelIndex(indexes+x))].index));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
{
if (channel == DefaultChannels)
{
- SetRedPixelComponent(q,gamma_map[ScaleQuantumToMap(
- GetRedPixelComponent(q))]);
- SetGreenPixelComponent(q,gamma_map[ScaleQuantumToMap(
- GetGreenPixelComponent(q))]);
- SetBluePixelComponent(q,gamma_map[ScaleQuantumToMap(
- GetBluePixelComponent(q))]);
+ SetPixelRed(q,gamma_map[ScaleQuantumToMap(
+ GetPixelRed(q))]);
+ SetPixelGreen(q,gamma_map[ScaleQuantumToMap(
+ GetPixelGreen(q))]);
+ SetPixelBlue(q,gamma_map[ScaleQuantumToMap(
+ GetPixelBlue(q))]);
}
else
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,gamma_map[ScaleQuantumToMap(
- GetRedPixelComponent(q))]);
+ SetPixelRed(q,gamma_map[ScaleQuantumToMap(
+ GetPixelRed(q))]);
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,gamma_map[ScaleQuantumToMap(
- GetGreenPixelComponent(q))]);
+ SetPixelGreen(q,gamma_map[ScaleQuantumToMap(
+ GetPixelGreen(q))]);
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,gamma_map[ScaleQuantumToMap(
- GetBluePixelComponent(q))]);
+ SetPixelBlue(q,gamma_map[ScaleQuantumToMap(
+ GetPixelBlue(q))]);
if ((channel & OpacityChannel) != 0)
{
if (image->matte == MagickFalse)
- SetOpacityPixelComponent(q,gamma_map[ScaleQuantumToMap(
- GetOpacityPixelComponent(q))]);
+ SetPixelOpacity(q,gamma_map[ScaleQuantumToMap(
+ GetPixelOpacity(q))]);
else
- SetAlphaPixelComponent(q,gamma_map[ScaleQuantumToMap((Quantum)
- GetAlphaPixelComponent(q))]);
+ SetPixelAlpha(q,gamma_map[ScaleQuantumToMap((Quantum)
+ GetPixelAlpha(q))]);
}
}
q++;
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,gamma_map[ScaleQuantumToMap(
- GetIndexPixelComponent(indexes+x))]);
+ SetPixelIndex(indexes+x,gamma_map[ScaleQuantumToMap(
+ GetPixelIndex(indexes+x))]);
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
status=MagickFalse;
if (image->progress_monitor != (MagickProgressMonitor) NULL)
pixel4=zero;
for (x=0; x < (ssize_t) image->columns; x++)
{
- point.x=QuantumScale*(level-1.0)*GetRedPixelComponent(q);
- point.y=QuantumScale*(level-1.0)*GetGreenPixelComponent(q);
- point.z=QuantumScale*(level-1.0)*GetBluePixelComponent(q);
+ point.x=QuantumScale*(level-1.0)*GetPixelRed(q);
+ point.y=QuantumScale*(level-1.0)*GetPixelGreen(q);
+ point.z=QuantumScale*(level-1.0)*GetPixelBlue(q);
offset=point.x+level*floor(point.y)+cube_size*floor(point.z);
point.x-=floor(point.x);
point.y-=floor(point.y);
MagickPixelCompositeAreaBlend(&pixel3,pixel3.opacity,&pixel4,
pixel4.opacity,point.z,&pixel);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
+ SetPixelRed(q,ClampToQuantum(pixel.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
if (((channel & OpacityChannel) != 0) && (image->matte != MagickFalse))
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,ClampToQuantum(pixel.index));
+ SetPixelIndex(indexes+x,ClampToQuantum(pixel.index));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,LevelQuantum(GetRedPixelComponent(q)));
+ SetPixelRed(q,LevelQuantum(GetPixelRed(q)));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,LevelQuantum(GetGreenPixelComponent(q)));
+ SetPixelGreen(q,LevelQuantum(GetPixelGreen(q)));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,LevelQuantum(GetBluePixelComponent(q)));
+ SetPixelBlue(q,LevelQuantum(GetPixelBlue(q)));
if (((channel & OpacityChannel) != 0) &&
(image->matte == MagickTrue))
- SetAlphaPixelComponent(q,LevelQuantum(GetAlphaPixelComponent(q)));
+ SetPixelAlpha(q,LevelQuantum(GetPixelAlpha(q)));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,LevelQuantum(
- GetIndexPixelComponent(indexes+x)));
+ SetPixelIndex(indexes+x,LevelQuantum(
+ GetPixelIndex(indexes+x)));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,LevelizeValue(GetRedPixelComponent(q)));
+ SetPixelRed(q,LevelizeValue(GetPixelRed(q)));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,LevelizeValue(GetGreenPixelComponent(q)));
+ SetPixelGreen(q,LevelizeValue(GetPixelGreen(q)));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,LevelizeValue(GetBluePixelComponent(q)));
+ SetPixelBlue(q,LevelizeValue(GetPixelBlue(q)));
if (((channel & OpacityChannel) != 0) &&
(image->matte == MagickTrue))
- SetOpacityPixelComponent(q,LevelizeValue(GetOpacityPixelComponent(q)));
+ SetPixelOpacity(q,LevelizeValue(GetPixelOpacity(q)));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,LevelizeValue(
- GetIndexPixelComponent(indexes+x)));
+ SetPixelIndex(indexes+x,LevelizeValue(
+ GetPixelIndex(indexes+x)));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- red=GetRedPixelComponent(q);
- green=GetGreenPixelComponent(q);
- blue=GetBluePixelComponent(q);
+ red=GetPixelRed(q);
+ green=GetPixelGreen(q);
+ blue=GetPixelBlue(q);
switch (colorspace)
{
case HSBColorspace:
break;
}
}
- SetRedPixelComponent(q,red);
- SetGreenPixelComponent(q,green);
- SetBluePixelComponent(q,blue);
+ SetPixelRed(q,red);
+ SetPixelGreen(q,green);
+ SetPixelBlue(q,blue);
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- if ((GetRedPixelComponent(q) != GetGreenPixelComponent(q)) ||
- (GetGreenPixelComponent(q) != GetBluePixelComponent(q)))
+ if ((GetPixelRed(q) != GetPixelGreen(q)) ||
+ (GetPixelGreen(q) != GetPixelBlue(q)))
{
q++;
continue;
}
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,QuantumRange-GetRedPixelComponent(q));
+ SetPixelRed(q,QuantumRange-GetPixelRed(q));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,QuantumRange-GetGreenPixelComponent(q));
+ SetPixelGreen(q,QuantumRange-GetPixelGreen(q));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,QuantumRange-GetBluePixelComponent(q));
+ SetPixelBlue(q,QuantumRange-GetPixelBlue(q));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,QuantumRange-
- GetOpacityPixelComponent(q));
+ SetPixelOpacity(q,QuantumRange-
+ GetPixelOpacity(q));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,QuantumRange-
- GetIndexPixelComponent(indexes+x));
+ SetPixelIndex(indexes+x,QuantumRange-
+ GetPixelIndex(indexes+x));
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,QuantumRange-GetRedPixelComponent(q));
+ SetPixelRed(q,QuantumRange-GetPixelRed(q));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,QuantumRange-GetGreenPixelComponent(q));
+ SetPixelGreen(q,QuantumRange-GetPixelGreen(q));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,QuantumRange-GetBluePixelComponent(q));
+ SetPixelBlue(q,QuantumRange-GetPixelBlue(q));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,QuantumRange-GetOpacityPixelComponent(q));
+ SetPixelOpacity(q,QuantumRange-GetPixelOpacity(q));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,QuantumRange-
- GetIndexPixelComponent(indexes+x));
+ SetPixelIndex(indexes+x,QuantumRange-
+ GetPixelIndex(indexes+x));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(sigmoidal_map[ScaleQuantumToMap(
- GetRedPixelComponent(q))]));
+ SetPixelRed(q,ClampToQuantum(sigmoidal_map[ScaleQuantumToMap(
+ GetPixelRed(q))]));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(sigmoidal_map[ScaleQuantumToMap(
- GetGreenPixelComponent(q))]));
+ SetPixelGreen(q,ClampToQuantum(sigmoidal_map[ScaleQuantumToMap(
+ GetPixelGreen(q))]));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(sigmoidal_map[ScaleQuantumToMap(
- GetBluePixelComponent(q))]));
+ SetPixelBlue(q,ClampToQuantum(sigmoidal_map[ScaleQuantumToMap(
+ GetPixelBlue(q))]));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToQuantum(sigmoidal_map[
- ScaleQuantumToMap(GetOpacityPixelComponent(q))]));
+ SetPixelOpacity(q,ClampToQuantum(sigmoidal_map[
+ ScaleQuantumToMap(GetPixelOpacity(q))]));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,ClampToQuantum(sigmoidal_map[
- ScaleQuantumToMap(GetIndexPixelComponent(indexes+x))]));
+ SetPixelIndex(indexes+x,ClampToQuantum(sigmoidal_map[
+ ScaleQuantumToMap(GetPixelIndex(indexes+x))]));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
indexes=GetCacheViewVirtualIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- grays[ScaleQuantumToMap(GetRedPixelComponent(p))].red=
- ScaleQuantumToMap(GetRedPixelComponent(p));
- grays[ScaleQuantumToMap(GetGreenPixelComponent(p))].green=
- ScaleQuantumToMap(GetGreenPixelComponent(p));
- grays[ScaleQuantumToMap(GetBluePixelComponent(p))].blue=
- ScaleQuantumToMap(GetBluePixelComponent(p));
+ grays[ScaleQuantumToMap(GetPixelRed(p))].red=
+ ScaleQuantumToMap(GetPixelRed(p));
+ grays[ScaleQuantumToMap(GetPixelGreen(p))].green=
+ ScaleQuantumToMap(GetPixelGreen(p));
+ grays[ScaleQuantumToMap(GetPixelBlue(p))].blue=
+ ScaleQuantumToMap(GetPixelBlue(p));
if (image->colorspace == CMYKColorspace)
- grays[ScaleQuantumToMap(GetIndexPixelComponent(indexes+x))].index=
- ScaleQuantumToMap(GetIndexPixelComponent(indexes+x));
+ grays[ScaleQuantumToMap(GetPixelIndex(indexes+x))].index=
+ ScaleQuantumToMap(GetPixelIndex(indexes+x));
if (image->matte != MagickFalse)
- grays[ScaleQuantumToMap(GetOpacityPixelComponent(p))].opacity=
- ScaleQuantumToMap(GetOpacityPixelComponent(p));
+ grays[ScaleQuantumToMap(GetPixelOpacity(p))].opacity=
+ ScaleQuantumToMap(GetPixelOpacity(p));
p++;
}
}
}
u=0;
v=0;
- while (grays[u].red != ScaleQuantumToMap(GetRedPixelComponent(p)))
+ while (grays[u].red != ScaleQuantumToMap(GetPixelRed(p)))
u++;
- while (grays[v].red != ScaleQuantumToMap(GetRedPixelComponent(p+offset)))
+ while (grays[v].red != ScaleQuantumToMap(GetPixelRed(p+offset)))
v++;
cooccurrence[u][v].direction[i].red++;
cooccurrence[v][u].direction[i].red++;
u=0;
v=0;
- while (grays[u].green != ScaleQuantumToMap(GetGreenPixelComponent(p)))
+ while (grays[u].green != ScaleQuantumToMap(GetPixelGreen(p)))
u++;
- while (grays[v].green != ScaleQuantumToMap(GetGreenPixelComponent(p+offset)))
+ while (grays[v].green != ScaleQuantumToMap(GetPixelGreen(p+offset)))
v++;
cooccurrence[u][v].direction[i].green++;
cooccurrence[v][u].direction[i].green++;
u=0;
v=0;
- while (grays[u].blue != ScaleQuantumToMap(GetBluePixelComponent(p)))
+ while (grays[u].blue != ScaleQuantumToMap(GetPixelBlue(p)))
u++;
while (grays[v].blue != ScaleQuantumToMap((p+offset)->blue))
v++;
{
u=0;
v=0;
- while (grays[u].index != ScaleQuantumToMap(GetIndexPixelComponent(indexes+x)))
+ while (grays[u].index != ScaleQuantumToMap(GetPixelIndex(indexes+x)))
u++;
- while (grays[v].index != ScaleQuantumToMap(GetIndexPixelComponent(indexes+x+offset)))
+ while (grays[v].index != ScaleQuantumToMap(GetPixelIndex(indexes+x+offset)))
v++;
cooccurrence[u][v].direction[i].index++;
cooccurrence[v][u].direction[i].index++;
{
u=0;
v=0;
- while (grays[u].opacity != ScaleQuantumToMap(GetOpacityPixelComponent(p)))
+ while (grays[u].opacity != ScaleQuantumToMap(GetPixelOpacity(p)))
u++;
while (grays[v].opacity != ScaleQuantumToMap((p+offset)->opacity))
v++;
case RedChannel:
default:
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumRange*
+ SetPixelRed(q,ClampToQuantum(QuantumRange*
magnitude_source[i]));
break;
}
case GreenChannel:
{
- SetGreenPixelComponent(q,ClampToQuantum(QuantumRange*
+ SetPixelGreen(q,ClampToQuantum(QuantumRange*
magnitude_source[i]));
break;
}
case BlueChannel:
{
- SetBluePixelComponent(q,ClampToQuantum(QuantumRange*
+ SetPixelBlue(q,ClampToQuantum(QuantumRange*
magnitude_source[i]));
break;
}
case OpacityChannel:
{
- SetOpacityPixelComponent(q,ClampToQuantum(QuantumRange*
+ SetPixelOpacity(q,ClampToQuantum(QuantumRange*
magnitude_source[i]));
break;
}
case IndexChannel:
{
- SetIndexPixelComponent(indexes+x,ClampToQuantum(QuantumRange*
+ SetPixelIndex(indexes+x,ClampToQuantum(QuantumRange*
magnitude_source[i]));
break;
}
case GrayChannels:
{
- SetGrayPixelComponent(q,ClampToQuantum(QuantumRange*
+ SetPixelGray(q,ClampToQuantum(QuantumRange*
magnitude_source[i]));
break;
}
case RedChannel:
default:
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumRange*
+ SetPixelRed(q,ClampToQuantum(QuantumRange*
phase_source[i]));
break;
}
case GreenChannel:
{
- SetGreenPixelComponent(q,ClampToQuantum(QuantumRange*
+ SetPixelGreen(q,ClampToQuantum(QuantumRange*
phase_source[i]));
break;
}
case BlueChannel:
{
- SetBluePixelComponent(q,ClampToQuantum(QuantumRange*
+ SetPixelBlue(q,ClampToQuantum(QuantumRange*
phase_source[i]));
break;
}
case OpacityChannel:
{
- SetOpacityPixelComponent(q,ClampToQuantum(QuantumRange*
+ SetPixelOpacity(q,ClampToQuantum(QuantumRange*
phase_source[i]));
break;
}
case IndexChannel:
{
- SetIndexPixelComponent(indexes+x,ClampToQuantum(QuantumRange*
+ SetPixelIndex(indexes+x,ClampToQuantum(QuantumRange*
phase_source[i]));
break;
}
case GrayChannels:
{
- SetGrayPixelComponent(q,ClampToQuantum(QuantumRange*phase_source[i]));
+ SetPixelGray(q,ClampToQuantum(QuantumRange*phase_source[i]));
break;
}
}
case RedChannel:
default:
{
- source[i]=QuantumScale*GetRedPixelComponent(p);
+ source[i]=QuantumScale*GetPixelRed(p);
break;
}
case GreenChannel:
{
- source[i]=QuantumScale*GetGreenPixelComponent(p);
+ source[i]=QuantumScale*GetPixelGreen(p);
break;
}
case BlueChannel:
{
- source[i]=QuantumScale*GetBluePixelComponent(p);
+ source[i]=QuantumScale*GetPixelBlue(p);
break;
}
case OpacityChannel:
{
- source[i]=QuantumScale*GetOpacityPixelComponent(p);
+ source[i]=QuantumScale*GetPixelOpacity(p);
break;
}
case IndexChannel:
{
- source[i]=QuantumScale*GetIndexPixelComponent(indexes+x);
+ source[i]=QuantumScale*GetPixelIndex(indexes+x);
break;
}
case GrayChannels:
{
- source[i]=QuantumScale*GetGrayPixelComponent(p);
+ source[i]=QuantumScale*GetPixelGray(p);
break;
}
}
case RedChannel:
default:
{
- magnitude_source[i]=QuantumScale*GetRedPixelComponent(p);
+ magnitude_source[i]=QuantumScale*GetPixelRed(p);
break;
}
case GreenChannel:
{
- magnitude_source[i]=QuantumScale*GetGreenPixelComponent(p);
+ magnitude_source[i]=QuantumScale*GetPixelGreen(p);
break;
}
case BlueChannel:
{
- magnitude_source[i]=QuantumScale*GetBluePixelComponent(p);
+ magnitude_source[i]=QuantumScale*GetPixelBlue(p);
break;
}
case OpacityChannel:
{
- magnitude_source[i]=QuantumScale*GetOpacityPixelComponent(p);
+ magnitude_source[i]=QuantumScale*GetPixelOpacity(p);
break;
}
case IndexChannel:
{
- magnitude_source[i]=QuantumScale*GetIndexPixelComponent(indexes+x);
+ magnitude_source[i]=QuantumScale*GetPixelIndex(indexes+x);
break;
}
case GrayChannels:
{
- magnitude_source[i]=QuantumScale*GetGrayPixelComponent(p);
+ magnitude_source[i]=QuantumScale*GetPixelGray(p);
break;
}
}
case RedChannel:
default:
{
- phase_source[i]=QuantumScale*GetRedPixelComponent(p);
+ phase_source[i]=QuantumScale*GetPixelRed(p);
break;
}
case GreenChannel:
{
- phase_source[i]=QuantumScale*GetGreenPixelComponent(p);
+ phase_source[i]=QuantumScale*GetPixelGreen(p);
break;
}
case BlueChannel:
{
- phase_source[i]=QuantumScale*GetBluePixelComponent(p);
+ phase_source[i]=QuantumScale*GetPixelBlue(p);
break;
}
case OpacityChannel:
{
- phase_source[i]=QuantumScale*GetOpacityPixelComponent(p);
+ phase_source[i]=QuantumScale*GetPixelOpacity(p);
break;
}
case IndexChannel:
{
- phase_source[i]=QuantumScale*GetIndexPixelComponent(indexes+x);
+ phase_source[i]=QuantumScale*GetPixelIndex(indexes+x);
break;
}
case GrayChannels:
{
- phase_source[i]=QuantumScale*GetGrayPixelComponent(p);
+ phase_source[i]=QuantumScale*GetPixelGray(p);
break;
}
}
case RedChannel:
default:
{
- SetRedPixelComponent(q,ClampToQuantum(QuantumRange*source[i]));
+ SetPixelRed(q,ClampToQuantum(QuantumRange*source[i]));
break;
}
case GreenChannel:
{
- SetGreenPixelComponent(q,ClampToQuantum(QuantumRange*source[i]));
+ SetPixelGreen(q,ClampToQuantum(QuantumRange*source[i]));
break;
}
case BlueChannel:
{
- SetBluePixelComponent(q,ClampToQuantum(QuantumRange*source[i]));
+ SetPixelBlue(q,ClampToQuantum(QuantumRange*source[i]));
break;
}
case OpacityChannel:
{
- SetOpacityPixelComponent(q,ClampToQuantum(QuantumRange*source[i]));
+ SetPixelOpacity(q,ClampToQuantum(QuantumRange*source[i]));
break;
}
case IndexChannel:
{
- SetIndexPixelComponent(indexes+x,ClampToQuantum(QuantumRange*
+ SetPixelIndex(indexes+x,ClampToQuantum(QuantumRange*
source[i]));
break;
}
case GrayChannels:
{
- SetGrayPixelComponent(q,ClampToQuantum(QuantumRange*source[i]));
+ SetPixelGray(q,ClampToQuantum(QuantumRange*source[i]));
break;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(GenerateDifferentialNoise(
- random_info[id],GetRedPixelComponent(p),noise_type,attenuate)));
+ SetPixelRed(q,ClampToQuantum(GenerateDifferentialNoise(
+ random_info[id],GetPixelRed(p),noise_type,attenuate)));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(GenerateDifferentialNoise(
- random_info[id],GetGreenPixelComponent(p),noise_type,attenuate)));
+ SetPixelGreen(q,ClampToQuantum(GenerateDifferentialNoise(
+ random_info[id],GetPixelGreen(p),noise_type,attenuate)));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(GenerateDifferentialNoise(
- random_info[id],GetBluePixelComponent(p),noise_type,attenuate)));
+ SetPixelBlue(q,ClampToQuantum(GenerateDifferentialNoise(
+ random_info[id],GetPixelBlue(p),noise_type,attenuate)));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToQuantum(GenerateDifferentialNoise(
- random_info[id],GetOpacityPixelComponent(p),noise_type,attenuate)));
+ SetPixelOpacity(q,ClampToQuantum(GenerateDifferentialNoise(
+ random_info[id],GetPixelOpacity(p),noise_type,attenuate)));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(noise_indexes+x,ClampToQuantum(
- GenerateDifferentialNoise(random_info[id],GetIndexPixelComponent(
+ SetPixelIndex(noise_indexes+x,ClampToQuantum(
+ GenerateDifferentialNoise(random_info[id],GetPixelIndex(
indexes+x),noise_type,attenuate)));
p++;
q++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- quantum=GetRedPixelComponent(p);
- if (GetGreenPixelComponent(p) < quantum)
- quantum=GetGreenPixelComponent(p);
- if (GetBluePixelComponent(p) < quantum)
- quantum=GetBluePixelComponent(p);
- pixel.red=0.5*(GetRedPixelComponent(p)+factor*quantum);
- pixel.green=0.5*(GetGreenPixelComponent(p)+factor*quantum);
- pixel.blue=0.5*(GetBluePixelComponent(p)+factor*quantum);
- quantum=GetRedPixelComponent(p);
- if (GetGreenPixelComponent(p) > quantum)
- quantum=GetGreenPixelComponent(p);
- if (GetBluePixelComponent(p) > quantum)
- quantum=GetBluePixelComponent(p);
+ quantum=GetPixelRed(p);
+ if (GetPixelGreen(p) < quantum)
+ quantum=GetPixelGreen(p);
+ if (GetPixelBlue(p) < quantum)
+ quantum=GetPixelBlue(p);
+ pixel.red=0.5*(GetPixelRed(p)+factor*quantum);
+ pixel.green=0.5*(GetPixelGreen(p)+factor*quantum);
+ pixel.blue=0.5*(GetPixelBlue(p)+factor*quantum);
+ quantum=GetPixelRed(p);
+ if (GetPixelGreen(p) > quantum)
+ quantum=GetPixelGreen(p);
+ if (GetPixelBlue(p) > quantum)
+ quantum=GetPixelBlue(p);
pixel.red=0.5*(pixel.red+factor*quantum);
pixel.green=0.5*(pixel.green+factor*quantum);
pixel.blue=0.5*(pixel.blue+factor*quantum);
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
+ SetPixelRed(q,ClampToQuantum(pixel.red));
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
p++;
q++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,((GetRedPixelComponent(p)*(100.0-pixel.red)+
+ SetPixelRed(q,((GetPixelRed(p)*(100.0-pixel.red)+
colorize.red*pixel.red)/100.0));
- SetGreenPixelComponent(q,((GetGreenPixelComponent(p)*(100.0-pixel.green)+
+ SetPixelGreen(q,((GetPixelGreen(p)*(100.0-pixel.green)+
colorize.green*pixel.green)/100.0));
- SetBluePixelComponent(q,((GetBluePixelComponent(p)*(100.0-pixel.blue)+
+ SetPixelBlue(q,((GetPixelBlue(p)*(100.0-pixel.blue)+
colorize.blue*pixel.blue)/100.0));
- SetOpacityPixelComponent(q,((GetOpacityPixelComponent(p)*(100.0-
+ SetPixelOpacity(q,((GetPixelOpacity(p)*(100.0-
pixel.opacity)+colorize.opacity*pixel.opacity)/100.0));
p++;
q++;
height=color_matrix->height > 6 ? 6UL : color_matrix->height;
for (v=0; v < (ssize_t) height; v++)
{
- pixel=ColorMatrix[v][0]*GetRedPixelComponent(p)+ColorMatrix[v][1]*
- GetGreenPixelComponent(p)+ColorMatrix[v][2]*GetBluePixelComponent(p);
+ pixel=ColorMatrix[v][0]*GetPixelRed(p)+ColorMatrix[v][1]*
+ GetPixelGreen(p)+ColorMatrix[v][2]*GetPixelBlue(p);
if (image->matte != MagickFalse)
- pixel+=ColorMatrix[v][3]*(QuantumRange-GetOpacityPixelComponent(p));
+ pixel+=ColorMatrix[v][3]*(QuantumRange-GetPixelOpacity(p));
if (image->colorspace == CMYKColorspace)
- pixel+=ColorMatrix[v][4]*GetIndexPixelComponent(indexes+x);
+ pixel+=ColorMatrix[v][4]*GetPixelIndex(indexes+x);
pixel+=QuantumRange*ColorMatrix[v][5];
switch (v)
{
- case 0: SetRedPixelComponent(q,ClampToQuantum(pixel)); break;
- case 1: SetGreenPixelComponent(q,ClampToQuantum(pixel)); break;
- case 2: SetBluePixelComponent(q,ClampToQuantum(pixel)); break;
+ case 0: SetPixelRed(q,ClampToQuantum(pixel)); break;
+ case 1: SetPixelGreen(q,ClampToQuantum(pixel)); break;
+ case 2: SetPixelBlue(q,ClampToQuantum(pixel)); break;
case 3:
{
if (image->matte != MagickFalse)
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
break;
}
case 4:
{
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(color_indexes+x,ClampToQuantum(pixel));
+ SetPixelIndex(color_indexes+x,ClampToQuantum(pixel));
break;
}
}
if (pixel.matte == MagickFalse)
return(1.0);
- alpha=(MagickRealType) (QuantumScale*GetAlphaPixelComponent(&pixel));
+ alpha=(MagickRealType) (QuantumScale*GetPixelAlpha(&pixel));
return(alpha);
}
case IndexChannel:
case 'a':
{
if (LocaleCompare(symbol,"a") == 0)
- return((MagickRealType) (QuantumScale*GetAlphaPixelComponent(&pixel)));
+ return((MagickRealType) (QuantumScale*GetPixelAlpha(&pixel)));
break;
}
case 'B':
{
(void) FxEvaluateChannelExpression(fx_info[id],RedChannel,x,y,
&alpha,exception);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType) QuantumRange*
+ SetPixelRed(q,ClampToQuantum((MagickRealType) QuantumRange*
alpha));
}
if ((channel & GreenChannel) != 0)
{
(void) FxEvaluateChannelExpression(fx_info[id],GreenChannel,x,y,
&alpha,exception);
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType) QuantumRange*
+ SetPixelGreen(q,ClampToQuantum((MagickRealType) QuantumRange*
alpha));
}
if ((channel & BlueChannel) != 0)
{
(void) FxEvaluateChannelExpression(fx_info[id],BlueChannel,x,y,
&alpha,exception);
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType) QuantumRange*
+ SetPixelBlue(q,ClampToQuantum((MagickRealType) QuantumRange*
alpha));
}
if ((channel & OpacityChannel) != 0)
(void) FxEvaluateChannelExpression(fx_info[id],OpacityChannel,x,y,
&alpha,exception);
if (image->matte == MagickFalse)
- SetOpacityPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelOpacity(q,ClampToQuantum((MagickRealType)
QuantumRange*alpha));
else
- SetOpacityPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelOpacity(q,ClampToQuantum((MagickRealType)
(QuantumRange-QuantumRange*alpha)));
}
if (((channel & IndexChannel) != 0) &&
{
(void) FxEvaluateChannelExpression(fx_info[id],IndexChannel,x,y,
&alpha,exception);
- SetIndexPixelComponent(fx_indexes+x,ClampToQuantum((MagickRealType)
+ SetPixelIndex(fx_indexes+x,ClampToQuantum((MagickRealType)
QuantumRange*alpha));
}
q++;
}
for (x=0; x < (ssize_t) morph_images->columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum(alpha*
- GetRedPixelComponent(q)+beta*GetRedPixelComponent(p)));
- SetGreenPixelComponent(q,ClampToQuantum(alpha*
- GetGreenPixelComponent(q)+beta*GetGreenPixelComponent(p)));
- SetBluePixelComponent(q,ClampToQuantum(alpha*
- GetBluePixelComponent(q)+beta*GetBluePixelComponent(p)));
- SetOpacityPixelComponent(q,ClampToQuantum(alpha*
- GetOpacityPixelComponent(q)+beta*GetOpacityPixelComponent(p)));
+ SetPixelRed(q,ClampToQuantum(alpha*
+ GetPixelRed(q)+beta*GetPixelRed(p)));
+ SetPixelGreen(q,ClampToQuantum(alpha*
+ GetPixelGreen(q)+beta*GetPixelGreen(p)));
+ SetPixelBlue(q,ClampToQuantum(alpha*
+ GetPixelBlue(q)+beta*GetPixelBlue(p)));
+ SetPixelOpacity(q,ClampToQuantum(alpha*
+ GetPixelOpacity(q)+beta*GetPixelOpacity(p)));
p++;
q++;
}
q=QueueCacheViewAuthenticPixels(image_view,x,y_mid,1,1,exception);
if (q == (PixelPacket *) NULL)
return(MagickTrue);
- SetRedPixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelRed(q,PlasmaPixel(random_info,(MagickRealType)
(u.red+v.red)/2.0,plasma));
- SetGreenPixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelGreen(q,PlasmaPixel(random_info,(MagickRealType)
(u.green+v.green)/2.0,plasma));
- SetBluePixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelBlue(q,PlasmaPixel(random_info,(MagickRealType)
(u.blue+v.blue)/2.0,plasma));
(void) SyncCacheViewAuthenticPixels(image_view,exception);
if (segment->x1 != segment->x2)
q=QueueCacheViewAuthenticPixels(image_view,x,y_mid,1,1,exception);
if (q == (PixelPacket *) NULL)
return(MagickTrue);
- SetRedPixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelRed(q,PlasmaPixel(random_info,(MagickRealType)
(u.red+v.red)/2.0,plasma));
- SetGreenPixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelGreen(q,PlasmaPixel(random_info,(MagickRealType)
(u.green+v.green)/2.0,plasma));
- SetBluePixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelBlue(q,PlasmaPixel(random_info,(MagickRealType)
(u.blue+v.blue)/2.0,plasma));
(void) SyncCacheViewAuthenticPixels(image_view,exception);
}
q=QueueCacheViewAuthenticPixels(image_view,x_mid,y,1,1,exception);
if (q == (PixelPacket *) NULL)
return(MagickTrue);
- SetRedPixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelRed(q,PlasmaPixel(random_info,(MagickRealType)
(u.red+v.red)/2.0,plasma));
- SetGreenPixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelGreen(q,PlasmaPixel(random_info,(MagickRealType)
(u.green+v.green)/2.0,plasma));
- SetBluePixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelBlue(q,PlasmaPixel(random_info,(MagickRealType)
(u.blue+v.blue)/2.0,plasma));
(void) SyncCacheViewAuthenticPixels(image_view,exception);
}
q=QueueCacheViewAuthenticPixels(image_view,x_mid,y,1,1,exception);
if (q == (PixelPacket *) NULL)
return(MagickTrue);
- SetRedPixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelRed(q,PlasmaPixel(random_info,(MagickRealType)
(u.red+v.red)/2.0,plasma));
- SetGreenPixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelGreen(q,PlasmaPixel(random_info,(MagickRealType)
(u.green+v.green)/2.0,plasma));
- SetBluePixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelBlue(q,PlasmaPixel(random_info,(MagickRealType)
(u.blue+v.blue)/2.0,plasma));
(void) SyncCacheViewAuthenticPixels(image_view,exception);
}
q=QueueCacheViewAuthenticPixels(image_view,x_mid,y_mid,1,1,exception);
if (q == (PixelPacket *) NULL)
return(MagickTrue);
- SetRedPixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelRed(q,PlasmaPixel(random_info,(MagickRealType)
(u.red+v.red)/2.0,plasma));
- SetGreenPixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelGreen(q,PlasmaPixel(random_info,(MagickRealType)
(u.green+v.green)/2.0,plasma));
- SetBluePixelComponent(q,PlasmaPixel(random_info,(MagickRealType)
+ SetPixelBlue(q,PlasmaPixel(random_info,(MagickRealType)
(u.blue+v.blue)/2.0,plasma));
(void) SyncCacheViewAuthenticPixels(image_view,exception);
}
intensity=(MagickRealType) PixelIntensityToQuantum(p);
tone=intensity > threshold ? (MagickRealType) QuantumRange : intensity+
(MagickRealType) QuantumRange-threshold;
- SetRedPixelComponent(q,ClampToQuantum(tone));
+ SetPixelRed(q,ClampToQuantum(tone));
tone=intensity > (7.0*threshold/6.0) ? (MagickRealType) QuantumRange :
intensity+(MagickRealType) QuantumRange-7.0*threshold/6.0;
- SetGreenPixelComponent(q,ClampToQuantum(tone));
+ SetPixelGreen(q,ClampToQuantum(tone));
tone=intensity < (threshold/6.0) ? 0 : intensity-threshold/6.0;
- SetBluePixelComponent(q,ClampToQuantum(tone));
+ SetPixelBlue(q,ClampToQuantum(tone));
tone=threshold/7.0;
- if ((MagickRealType) GetGreenPixelComponent(q) < tone)
- SetGreenPixelComponent(q,ClampToQuantum(tone));
- if ((MagickRealType) GetBluePixelComponent(q) < tone)
- SetBluePixelComponent(q,ClampToQuantum(tone));
+ if ((MagickRealType) GetPixelGreen(q) < tone)
+ SetPixelGreen(q,ClampToQuantum(tone));
+ if ((MagickRealType) GetPixelBlue(q) < tone)
+ SetPixelBlue(q,ClampToQuantum(tone));
p++;
q++;
}
}
for (x=0; x < (ssize_t) border_image->columns; x++)
{
- SetRedPixelComponent(q,border_image->background_color.red);
- SetGreenPixelComponent(q,border_image->background_color.green);
- SetBluePixelComponent(q,border_image->background_color.blue);
+ SetPixelRed(q,border_image->background_color.red);
+ SetPixelGreen(q,border_image->background_color.green);
+ SetPixelBlue(q,border_image->background_color.blue);
if (border_image->matte == MagickFalse)
- SetOpacityPixelComponent(q,border_image->background_color.opacity);
+ SetPixelOpacity(q,border_image->background_color.opacity);
else
- SetOpacityPixelComponent(q,ClampToQuantum((MagickRealType)
- (QuantumRange-GetAlphaPixelComponent(q)*opacity/100.0)));
+ SetPixelOpacity(q,ClampToQuantum((MagickRealType)
+ (QuantumRange-GetPixelAlpha(q)*opacity/100.0)));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- if ((MagickRealType) GetRedPixelComponent(q) > threshold)
- SetRedPixelComponent(q,QuantumRange-GetRedPixelComponent(q));
- if ((MagickRealType) GetGreenPixelComponent(q) > threshold)
- SetGreenPixelComponent(q,QuantumRange-GetGreenPixelComponent(q));
- if ((MagickRealType) GetBluePixelComponent(q) > threshold)
- SetBluePixelComponent(q,QuantumRange-GetBluePixelComponent(q));
+ if ((MagickRealType) GetPixelRed(q) > threshold)
+ SetPixelRed(q,QuantumRange-GetPixelRed(q));
+ if ((MagickRealType) GetPixelGreen(q) > threshold)
+ SetPixelGreen(q,QuantumRange-GetPixelGreen(q));
+ if ((MagickRealType) GetPixelBlue(q) > threshold)
+ SetPixelBlue(q,QuantumRange-GetPixelBlue(q));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
{
case 0:
{
- SetBit(GetRedPixelComponent(q),j,GetBit(PixelIntensityToQuantum(
+ SetBit(GetPixelRed(q),j,GetBit(PixelIntensityToQuantum(
&pixel),i));
break;
}
case 1:
{
- SetBit(GetGreenPixelComponent(q),j,GetBit(PixelIntensityToQuantum(
+ SetBit(GetPixelGreen(q),j,GetBit(PixelIntensityToQuantum(
&pixel),i));
break;
}
case 2:
{
- SetBit(GetBluePixelComponent(q),j,GetBit(PixelIntensityToQuantum(
+ SetBit(GetPixelBlue(q),j,GetBit(PixelIntensityToQuantum(
&pixel),i));
break;
}
break;
for (x=0; x < (ssize_t) stereo_image->columns; x++)
{
- SetRedPixelComponent(r,GetRedPixelComponent(p));
- SetGreenPixelComponent(r,GetGreenPixelComponent(q));
- SetBluePixelComponent(r,GetBluePixelComponent(q));
- SetOpacityPixelComponent(r,(GetOpacityPixelComponent(p)+q->opacity)/2);
+ SetPixelRed(r,GetPixelRed(p));
+ SetPixelGreen(r,GetPixelGreen(q));
+ SetPixelBlue(r,GetPixelBlue(q));
+ SetPixelOpacity(r,(GetPixelOpacity(p)+q->opacity)/2);
p++;
q++;
r++;
MagickRealType
weight;
- weight=QuantumScale*GetRedPixelComponent(p)-0.5;
- pixel.red=(MagickRealType) GetRedPixelComponent(p)+color_vector.red*(1.0-(4.0*
+ weight=QuantumScale*GetPixelRed(p)-0.5;
+ pixel.red=(MagickRealType) GetPixelRed(p)+color_vector.red*(1.0-(4.0*
(weight*weight)));
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
- weight=QuantumScale*GetGreenPixelComponent(p)-0.5;
- pixel.green=(MagickRealType) GetGreenPixelComponent(p)+color_vector.green*(1.0-(4.0*
+ SetPixelRed(q,ClampToQuantum(pixel.red));
+ weight=QuantumScale*GetPixelGreen(p)-0.5;
+ pixel.green=(MagickRealType) GetPixelGreen(p)+color_vector.green*(1.0-(4.0*
(weight*weight)));
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
- weight=QuantumScale*GetBluePixelComponent(p)-0.5;
- pixel.blue=(MagickRealType) GetBluePixelComponent(p)+color_vector.blue*(1.0-(4.0*
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
+ weight=QuantumScale*GetPixelBlue(p)-0.5;
+ pixel.blue=(MagickRealType) GetPixelBlue(p)+color_vector.blue*(1.0-(4.0*
(weight*weight)));
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
node_info->list[i].pixel=(*p);
if ((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass))
- node_info->list[i].index=GetIndexPixelComponent(indexes+x);
+ node_info->list[i].index=GetPixelIndex(indexes+x);
node_info->list[i].count=1;
node_info->number_unique++;
cube_info->colors++;
node_info->list[i].pixel=(*p);
if ((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass))
- node_info->list[i].index=GetIndexPixelComponent(indexes+x);
+ node_info->list[i].index=GetPixelIndex(indexes+x);
node_info->list[i].count=1;
node_info->number_unique++;
cube_info->colors++;
node_info->list[i].pixel=(*p);
if ((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass))
- node_info->list[i].index=GetIndexPixelComponent(indexes+x);
+ node_info->list[i].index=GetPixelIndex(indexes+x);
node_info->list[i].count=1;
node_info->number_unique++;
cube_info->colors++;
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity)
+ if (GetPixelOpacity(p) == (Quantum) TransparentOpacity)
break;
p++;
}
append_indexes=GetCacheViewAuthenticIndexQueue(append_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
if ((image->colorspace == CMYKColorspace) &&
(append_image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(append_indexes+x,GetIndexPixelComponent(
- indexes+x));
+ SetPixelIndex(append_indexes+x,GetPixelIndex(indexes+x));
p++;
q++;
}
q=pixels;
for (x=0; x < (ssize_t) combine_image->columns; x++)
{
- SetRedPixelComponent(q,PixelIntensityToQuantum(p));
+ SetPixelRed(q,PixelIntensityToQuantum(p));
p++;
q++;
}
q=pixels;
for (x=0; x < (ssize_t) combine_image->columns; x++)
{
- SetGreenPixelComponent(q,PixelIntensityToQuantum(p));
+ SetPixelGreen(q,PixelIntensityToQuantum(p));
p++;
q++;
}
q=pixels;
for (x=0; x < (ssize_t) combine_image->columns; x++)
{
- SetBluePixelComponent(q,PixelIntensityToQuantum(p));
+ SetPixelBlue(q,PixelIntensityToQuantum(p));
p++;
q++;
}
q=pixels;
for (x=0; x < (ssize_t) combine_image->columns; x++)
{
- SetOpacityPixelComponent(q,PixelIntensityToQuantum(p));
+ SetPixelOpacity(q,PixelIntensityToQuantum(p));
p++;
q++;
}
indexes=GetCacheViewAuthenticIndexQueue(combine_view);
for (x=0; x < (ssize_t) combine_image->columns; x++)
{
- SetIndexPixelComponent(indexes+x,PixelIntensityToQuantum(p));
+ SetPixelIndex(indexes+x,PixelIntensityToQuantum(p));
p++;
}
image_view=DestroyCacheView(image_view);
{
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
break;
{
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetGreenPixelComponent(q));
- SetBluePixelComponent(q,GetGreenPixelComponent(q));
+ SetPixelRed(q,GetPixelGreen(q));
+ SetPixelBlue(q,GetPixelGreen(q));
q++;
}
break;
{
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetBluePixelComponent(q));
- SetGreenPixelComponent(q,GetBluePixelComponent(q));
+ SetPixelRed(q,GetPixelBlue(q));
+ SetPixelGreen(q,GetPixelBlue(q));
q++;
}
break;
{
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetOpacityPixelComponent(q));
- SetGreenPixelComponent(q,GetOpacityPixelComponent(q));
- SetBluePixelComponent(q,GetOpacityPixelComponent(q));
+ SetPixelRed(q,GetPixelOpacity(q));
+ SetPixelGreen(q,GetPixelOpacity(q));
+ SetPixelBlue(q,GetPixelOpacity(q));
q++;
}
break;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetIndexPixelComponent(indexes+x));
- SetGreenPixelComponent(q,GetIndexPixelComponent(indexes+x));
- SetBluePixelComponent(q,GetIndexPixelComponent(indexes+x));
+ SetPixelRed(q,GetPixelIndex(indexes+x));
+ SetPixelGreen(q,GetPixelIndex(indexes+x));
+ SetPixelBlue(q,GetPixelIndex(indexes+x));
q++;
}
break;
{
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetAlphaPixelComponent(q));
- SetGreenPixelComponent(q,GetAlphaPixelComponent(q));
- SetBluePixelComponent(q,GetAlphaPixelComponent(q));
+ SetPixelRed(q,GetPixelAlpha(q));
+ SetPixelGreen(q,GetPixelAlpha(q));
+ SetPixelBlue(q,GetPixelAlpha(q));
q++;
}
break;
{
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetAlphaPixelComponent(q,PixelIntensityToQuantum(q));
+ SetPixelAlpha(q,PixelIntensityToQuantum(q));
q++;
}
break;
{
if (q->opacity == TransparentOpacity)
{
- SetRedPixelComponent(q,pixel.red);
- SetGreenPixelComponent(q,pixel.green);
- SetBluePixelComponent(q,pixel.blue);
+ SetPixelRed(q,pixel.red);
+ SetPixelGreen(q,pixel.green);
+ SetPixelBlue(q,pixel.blue);
}
q++;
}
{
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
status=MagickFalse;
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
status=MagickFalse;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,opacity);
+ SetPixelOpacity(q,opacity);
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
{
p=GetCacheViewVirtualPixels(left_view,x,left_geometry.y+y,1,1,exception);
if ((p == (const PixelPacket *) NULL) ||
- (GetOpacityPixelComponent(p) != TransparentOpacity) ||
+ (GetPixelOpacity(p) != TransparentOpacity) ||
((left_image->columns-x-1) >= gap))
break;
}
p=GetCacheViewVirtualPixels(right_view,x,right_geometry.y+y,1,1,
exception);
if ((p == (const PixelPacket *) NULL) ||
- (GetOpacityPixelComponent(p) != TransparentOpacity) || ((x+i) >= (ssize_t) gap))
+ (GetPixelOpacity(p) != TransparentOpacity) || ((x+i) >= (ssize_t) gap))
break;
}
if ((x+i) < (ssize_t) gap)
{
p=GetCacheViewVirtualPixels(top_view,top_geometry.x+x,y,1,1,exception);
if ((p == (const PixelPacket *) NULL) ||
- (GetOpacityPixelComponent(p) != TransparentOpacity) || ((top_image->rows-y-1) >= gap))
+ (GetPixelOpacity(p) != TransparentOpacity) || ((top_image->rows-y-1) >= gap))
break;
}
i=(ssize_t) top_image->rows-y-1;
p=GetCacheViewVirtualPixels(bottom_view,bottom_geometry.x+x,y,1,1,
exception);
if ((p == (const PixelPacket *) NULL) ||
- (GetOpacityPixelComponent(p) != TransparentOpacity) || ((y+i) >= (ssize_t) gap))
+ (GetPixelOpacity(p) != TransparentOpacity) || ((y+i) >= (ssize_t) gap))
break;
}
if ((y+i) < (ssize_t) gap)
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- index=PushColormapIndex(image,(size_t) GetIndexPixelComponent(indexes+x),
+ index=PushColormapIndex(image,(size_t) GetPixelIndex(indexes+x),
&range_exception);
if (image->matte == MagickFalse)
- SetRGBPixelComponents(q,image->colormap+(ssize_t) index)
+ SetPixelRGB(q,image->colormap+(ssize_t) index)
else
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) bounds->width; x++)
{
- if ((GetOpacityPixelComponent(p) <= (Quantum) (QuantumRange/2)) &&
+ if ((GetPixelOpacity(p) <= (Quantum) (QuantumRange/2)) &&
(q->opacity > (Quantum) (QuantumRange/2)))
break;
p++;
if (method == CompareAnyLayer)
return((MagickBooleanType)(IsMagickColorSimilar(p,q) == MagickFalse));
- o1 = (p->matte != MagickFalse) ? GetOpacityPixelComponent(p) : OpaqueOpacity;
+ o1 = (p->matte != MagickFalse) ? GetPixelOpacity(p) : OpaqueOpacity;
o2 = (q->matte != MagickFalse) ? q->opacity : OpaqueOpacity;
/*
for (x=0; x < image->columns; x++)
{
GetCPixel(x,y,&Pixel);
- SetRedPixelComponent(q,ScaleCharToQuantum(Pixel.red & 0xff));
- SetGreenPixelComponent(q,ScaleCharToQuantum(Pixel.green & 0xff));
- SetBluePixelComponent(q,ScaleCharToQuantum(Pixel.blue & 0xff));
+ SetPixelRed(q,ScaleCharToQuantum(Pixel.red & 0xff));
+ SetPixelGreen(q,ScaleCharToQuantum(Pixel.green & 0xff));
+ SetPixelBlue(q,ScaleCharToQuantum(Pixel.blue & 0xff));
if (image->storage_class == PseudoClass)
- SetIndexPixelComponent(indexes+x,Color2Index(&Pixel));
+ SetPixelIndex(indexes+x,Color2Index(&Pixel));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
*/
*q = p[r];
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(q_indexes+y,GetIndexPixelComponent(
+ SetPixelIndex(q_indexes+y,GetPixelIndex(
p_indexes+r));
/* Set the bias of the weighted average output */
*/
for (v=0; v < (ssize_t) kernel->height; v++) {
if ( IsNan(*k) ) continue;
- result.red += (*k)*GetRedPixelComponent(k_pixels);
- result.green += (*k)*GetGreenPixelComponent(k_pixels);
- result.blue += (*k)*GetBluePixelComponent(k_pixels);
- result.opacity += (*k)*GetOpacityPixelComponent(k_pixels);
+ result.red += (*k)*GetPixelRed(k_pixels);
+ result.green += (*k)*GetPixelGreen(k_pixels);
+ result.blue += (*k)*GetPixelBlue(k_pixels);
+ result.opacity += (*k)*GetPixelOpacity(k_pixels);
if ( image->colorspace == CMYKColorspace)
result.index += (*k)*(*k_indexes);
k--;
k_indexes++;
}
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(result.red));
+ SetPixelRed(q,ClampToQuantum(result.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(result.green));
+ SetPixelGreen(q,ClampToQuantum(result.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(result.blue));
+ SetPixelBlue(q,ClampToQuantum(result.blue));
if ((channel & OpacityChannel) != 0
&& image->matte == MagickTrue )
- SetOpacityPixelComponent(q,ClampToQuantum(result.opacity));
+ SetPixelOpacity(q,ClampToQuantum(result.opacity));
if ((channel & IndexChannel) != 0
&& image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(q_indexes+x,ClampToQuantum(result.index));
+ SetPixelIndex(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-GetOpacityPixelComponent(k_pixels)));
+ alpha=(*k)*(QuantumScale*(QuantumRange-GetPixelOpacity(k_pixels)));
gamma += alpha;
- result.red += alpha*GetRedPixelComponent(k_pixels);
- result.green += alpha*GetGreenPixelComponent(k_pixels);
- result.blue += alpha*GetBluePixelComponent(k_pixels);
- result.opacity += (*k)*GetOpacityPixelComponent(k_pixels);
+ result.red += alpha*GetPixelRed(k_pixels);
+ result.green += alpha*GetPixelGreen(k_pixels);
+ result.blue += alpha*GetPixelBlue(k_pixels);
+ result.opacity += (*k)*GetPixelOpacity(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);
- SetRedPixelComponent(q,ClampToQuantum(gamma*result.red));
- SetGreenPixelComponent(q,ClampToQuantum(gamma*result.green));
- SetBluePixelComponent(q,ClampToQuantum(gamma*result.blue));
- SetOpacityPixelComponent(q,ClampToQuantum(result.opacity));
+ SetPixelRed(q,ClampToQuantum(gamma*result.red));
+ SetPixelGreen(q,ClampToQuantum(gamma*result.green));
+ SetPixelBlue(q,ClampToQuantum(gamma*result.blue));
+ SetPixelOpacity(q,ClampToQuantum(result.opacity));
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(q_indexes+x,ClampToQuantum(gamma*
+ SetPixelIndex(q_indexes+x,ClampToQuantum(gamma*
result.index));
}
/* Count up changed pixels */
- if ( ( p[r].red != GetRedPixelComponent(q))
- || ( p[r].green != GetGreenPixelComponent(q))
- || ( p[r].blue != GetBluePixelComponent(q))
- || ( p[r].opacity != GetOpacityPixelComponent(q))
+ if ( ( p[r].red != GetPixelRed(q))
+ || ( p[r].green != GetPixelGreen(q))
+ || ( p[r].blue != GetPixelBlue(q))
+ || ( p[r].opacity != GetPixelOpacity(q))
|| ( image->colorspace == CMYKColorspace &&
- GetIndexPixelComponent(p_indexes+r) != GetIndexPixelComponent(q_indexes+x) ) )
+ GetPixelIndex(p_indexes+r) != GetPixelIndex(q_indexes+x) ) )
changed++; /* The pixel was changed in some way! */
p++;
q++;
*/
*q = p[r];
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(q_indexes+x,GetIndexPixelComponent(p_indexes+r));
+ SetPixelIndex(q_indexes+x,GetPixelIndex(p_indexes+r));
/* Defaults */
min.red =
result.opacity = QuantumRange - (MagickRealType) p[r].opacity;
result.index = 0.0;
if ( image->colorspace == CMYKColorspace)
- result.index = (MagickRealType) GetIndexPixelComponent(p_indexes+r);
+ result.index = (MagickRealType) GetPixelIndex(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)*GetIndexPixelComponent(k_indexes+u);
+ result.index += (*k)*GetPixelIndex(k_indexes+u);
}
k_pixels += virt_width;
k_indexes += virt_width;
}
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(result.red));
+ SetPixelRed(q,ClampToQuantum(result.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(result.green));
+ SetPixelGreen(q,ClampToQuantum(result.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(result.blue));
+ SetPixelBlue(q,ClampToQuantum(result.blue));
if ((channel & OpacityChannel) != 0
&& image->matte == MagickTrue )
- SetOpacityPixelComponent(q,ClampToQuantum(result.opacity));
+ SetPixelOpacity(q,ClampToQuantum(result.opacity));
if ((channel & IndexChannel) != 0
&& image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(q_indexes+x,ClampToQuantum(
+ SetPixelIndex(q_indexes+x,ClampToQuantum(
result.index));
}
else
result.blue += alpha*k_pixels[u].blue;
result.opacity += (*k)*k_pixels[u].opacity;
if ( image->colorspace == CMYKColorspace)
- result.index+=alpha*GetIndexPixelComponent(k_indexes+u);
+ result.index+=alpha*GetPixelIndex(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);
- SetRedPixelComponent(q,ClampToQuantum(gamma*result.red));
- SetGreenPixelComponent(q,ClampToQuantum(gamma*result.green));
- SetBluePixelComponent(q,ClampToQuantum(gamma*result.blue));
- SetOpacityPixelComponent(q,ClampToQuantum(result.opacity));
+ SetPixelRed(q,ClampToQuantum(gamma*result.red));
+ SetPixelGreen(q,ClampToQuantum(gamma*result.green));
+ SetPixelBlue(q,ClampToQuantum(gamma*result.blue));
+ SetPixelOpacity(q,ClampToQuantum(result.opacity));
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(q_indexes+x,ClampToQuantum(gamma*
+ SetPixelIndex(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) GetIndexPixelComponent(
+ Minimize(min.index,(double) GetPixelIndex(
k_indexes+u));
}
k_pixels += virt_width;
Maximize(max.opacity,
QuantumRange-(double) k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Maximize(max.index, (double) GetIndexPixelComponent(
+ Maximize(max.index, (double) GetPixelIndex(
k_indexes+u));
}
k_pixels += virt_width;
Minimize(min.opacity,
QuantumRange-(double) k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Minimize(min.index,(double) GetIndexPixelComponent(
+ Minimize(min.index,(double) GetPixelIndex(
k_indexes+u));
}
else if ( (*k) < 0.3 )
Maximize(max.opacity,
QuantumRange-(double) k_pixels[u].opacity);
if ( image->colorspace == CMYKColorspace)
- Maximize(max.index, (double) GetIndexPixelComponent(
+ Maximize(max.index, (double) GetPixelIndex(
k_indexes+u));
}
}
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)+GetIndexPixelComponent(
+ Minimize(result.index,(*k)+GetPixelIndex(
k_indexes+u));
}
k_pixels += virt_width;
break; /* full pixel was directly assigned - not a channel method */
default:
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(result.red));
+ SetPixelRed(q,ClampToQuantum(result.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(result.green));
+ SetPixelGreen(q,ClampToQuantum(result.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(result.blue));
+ SetPixelBlue(q,ClampToQuantum(result.blue));
if ((channel & OpacityChannel) != 0
&& image->matte == MagickTrue )
- SetAlphaPixelComponent(q,ClampToQuantum(result.opacity));
+ SetPixelAlpha(q,ClampToQuantum(result.opacity));
if ((channel & IndexChannel) != 0
&& image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(q_indexes+x,ClampToQuantum(result.index));
+ SetPixelIndex(q_indexes+x,ClampToQuantum(result.index));
break;
}
/* Count up changed pixels */
- if ( ( p[r].red != GetRedPixelComponent(q) )
- || ( p[r].green != GetGreenPixelComponent(q) )
- || ( p[r].blue != GetBluePixelComponent(q) )
- || ( p[r].opacity != GetOpacityPixelComponent(q) )
+ if ( ( p[r].red != GetPixelRed(q) )
+ || ( p[r].green != GetPixelGreen(q) )
+ || ( p[r].blue != GetPixelBlue(q) )
+ || ( p[r].opacity != GetPixelOpacity(q) )
|| ( image->colorspace == CMYKColorspace &&
- GetIndexPixelComponent(p_indexes+r) != GetIndexPixelComponent(q_indexes+x) ) )
+ GetPixelIndex(p_indexes+r) != GetPixelIndex(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)+GetIndexPixelComponent(k_indexes+u));
+ Minimize(result.index, (*k)+GetPixelIndex(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)+GetIndexPixelComponent(k_indexes+u));
+ Minimize(result.index, (*k)+GetPixelIndex(k_indexes+u));
}
break;
case VoronoiMorphology:
break;
default:
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(result.red));
+ SetPixelRed(q,ClampToQuantum(result.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(result.green));
+ SetPixelGreen(q,ClampToQuantum(result.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(result.blue));
+ SetPixelBlue(q,ClampToQuantum(result.blue));
if ((channel & OpacityChannel) != 0 && image->matte == MagickTrue )
- SetAlphaPixelComponent(q,ClampToQuantum(result.opacity));
+ SetPixelAlpha(q,ClampToQuantum(result.opacity));
if ((channel & IndexChannel) != 0
&& image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(q_indexes+x,ClampToQuantum(result.index));
+ SetPixelIndex(q_indexes+x,ClampToQuantum(result.index));
break;
}
/* Count up changed pixels */
- if ( ( p[r].red != GetRedPixelComponent(q) )
- || ( p[r].green != GetGreenPixelComponent(q) )
- || ( p[r].blue != GetBluePixelComponent(q) )
- || ( p[r].opacity != GetOpacityPixelComponent(q) )
+ if ( ( p[r].red != GetPixelRed(q) )
+ || ( p[r].green != GetPixelGreen(q) )
+ || ( p[r].blue != GetPixelBlue(q) )
+ || ( p[r].opacity != GetPixelOpacity(q) )
|| ( image->colorspace == CMYKColorspace &&
- GetIndexPixelComponent(p_indexes+r) != GetIndexPixelComponent(q_indexes+x) ) )
+ GetPixelIndex(p_indexes+r) != GetPixelIndex(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)+GetIndexPixelComponent(k_indexes+u));
+ Minimize(result.index,(*k)+GetPixelIndex(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)+GetIndexPixelComponent(k_indexes+u));
+ Minimize(result.index, (*k)+GetPixelIndex(k_indexes+u));
}
break;
case VoronoiMorphology:
break;
default:
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(result.red));
+ SetPixelRed(q,ClampToQuantum(result.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(result.green));
+ SetPixelGreen(q,ClampToQuantum(result.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(result.blue));
+ SetPixelBlue(q,ClampToQuantum(result.blue));
if ((channel & OpacityChannel) != 0 && image->matte == MagickTrue )
- SetAlphaPixelComponent(q,ClampToQuantum(result.opacity));
+ SetPixelAlpha(q,ClampToQuantum(result.opacity));
if ((channel & IndexChannel) != 0
&& image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(q_indexes+x,ClampToQuantum(result.index));
+ SetPixelIndex(q_indexes+x,ClampToQuantum(result.index));
break;
}
/* Count up changed pixels */
- if ( ( p[r].red != GetRedPixelComponent(q) )
- || ( p[r].green != GetGreenPixelComponent(q) )
- || ( p[r].blue != GetBluePixelComponent(q) )
- || ( p[r].opacity != GetOpacityPixelComponent(q) )
+ if ( ( p[r].red != GetPixelRed(q) )
+ || ( p[r].green != GetPixelGreen(q) )
+ || ( p[r].blue != GetPixelBlue(q) )
+ || ( p[r].opacity != GetPixelOpacity(q) )
|| ( image->colorspace == CMYKColorspace &&
- GetIndexPixelComponent(p_indexes+r) != GetIndexPixelComponent(q_indexes+x) ) )
+ GetPixelIndex(p_indexes+r) != GetPixelIndex(q_indexes+x) ) )
changed++; /* The pixel was changed in some way! */
p--; /* go backward through pixel buffers */
/* Transfer pixels, scaling to Quantum */
for( x=(ssize_t) page.width ; x> 0 ; x-- )
{
- q->rgbRed = ScaleQuantumToChar(GetRedPixelComponent(p));
- q->rgbGreen = ScaleQuantumToChar(GetGreenPixelComponent(p));
- q->rgbBlue = ScaleQuantumToChar(GetBluePixelComponent(p));
+ q->rgbRed = ScaleQuantumToChar(GetPixelRed(p));
+ q->rgbGreen = ScaleQuantumToChar(GetPixelGreen(p));
+ q->rgbBlue = ScaleQuantumToChar(GetPixelBlue(p));
q->rgbReserved = 0;
++q;
++p;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- q->rgbRed=ScaleQuantumToChar(GetRedPixelComponent(p));
- q->rgbGreen=ScaleQuantumToChar(GetGreenPixelComponent(p));
- q->rgbBlue=ScaleQuantumToChar(GetBluePixelComponent(p));
+ q->rgbRed=ScaleQuantumToChar(GetPixelRed(p));
+ q->rgbGreen=ScaleQuantumToChar(GetPixelGreen(p));
+ q->rgbBlue=ScaleQuantumToChar(GetPixelBlue(p));
q->rgbReserved=0;
p++;
q++;
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(p) != OpaqueOpacity)
+ if (GetPixelOpacity(p) != OpaqueOpacity)
{
(void) GetFillColor(draw_info,x,y,&fill_color);
SetMagickPixelPacket(image,&fill_color,(IndexPacket *) NULL,&fill);
if (image->colorspace == CMYKColorspace)
ConvertRGBToCMYK(&fill);
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(fill.red));
+ SetPixelRed(q,ClampToQuantum(fill.red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(fill.green));
+ SetPixelGreen(q,ClampToQuantum(fill.green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(fill.blue));
+ SetPixelBlue(q,ClampToQuantum(fill.blue));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToQuantum(fill.opacity));
+ SetPixelOpacity(q,ClampToQuantum(fill.opacity));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,ClampToQuantum(fill.index));
+ SetPixelIndex(indexes+x,ClampToQuantum(fill.index));
}
p++;
q++;
}
*q=(*(p+j));
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(paint_indexes+x,GetIndexPixelComponent(
+ SetPixelIndex(paint_indexes+x,GetPixelIndex(
indexes+x+j));
p++;
q++;
if (IsMagickColorSimilar(&pixel,target) != invert)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(fill->red));
+ SetPixelRed(q,ClampToQuantum(fill->red));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(fill->green));
+ SetPixelGreen(q,ClampToQuantum(fill->green));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(fill->blue));
+ SetPixelBlue(q,ClampToQuantum(fill->blue));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToQuantum(fill->opacity));
+ SetPixelOpacity(q,ClampToQuantum(fill->opacity));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,ClampToQuantum(fill->index));
+ SetPixelIndex(indexes+x,ClampToQuantum(fill->index));
}
q++;
}
static inline MagickBooleanType IsGrayPixel(const PixelPacket *pixel)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
- if ((GetRedPixelComponent(pixel) == GetGreenPixelComponent(pixel)) &&
- (GetGreenPixelComponent(pixel) == GetBluePixelComponent(pixel)))
+ if ((GetPixelRed(pixel) == GetPixelGreen(pixel)) &&
+ (GetPixelGreen(pixel) == GetPixelBlue(pixel)))
return(MagickTrue);
#else
{
alpha,
beta;
- alpha=GetRedPixelComponent(pixel)-GetGreenPixelComponent(pixel);
- beta=GetGreenPixelComponent(pixel)-GetBluePixelComponent(pixel);
+ alpha=GetPixelRed(pixel)-GetPixelGreen(pixel);
+ beta=GetPixelGreen(pixel)-GetPixelBlue(pixel);
if ((fabs(alpha) <= MagickEpsilon) && (fabs(beta) <= MagickEpsilon))
return(MagickTrue);
}
static inline MagickBooleanType IsMonochromePixel(const PixelPacket *pixel)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
- if (((GetRedPixelComponent(pixel) == 0) ||
- (GetRedPixelComponent(pixel) == (Quantum) QuantumRange)) &&
- (GetRedPixelComponent(pixel) == GetGreenPixelComponent(pixel)) &&
- (GetGreenPixelComponent(pixel) == GetBluePixelComponent(pixel)))
+ if (((GetPixelRed(pixel) == 0) ||
+ (GetPixelRed(pixel) == (Quantum) QuantumRange)) &&
+ (GetPixelRed(pixel) == GetPixelGreen(pixel)) &&
+ (GetPixelGreen(pixel) == GetPixelBlue(pixel)))
return(MagickTrue);
#else
{
alpha,
beta;
- alpha=GetRedPixelComponent(pixel)-GetGreenPixelComponent(pixel);
- beta=GetGreenPixelComponent(pixel)-GetBluePixelComponent(pixel);
- if (((fabs(GetRedPixelComponent(pixel)) <= MagickEpsilon) ||
- (fabs(GetRedPixelComponent(pixel)-QuantumRange) <= MagickEpsilon)) &&
+ alpha=GetPixelRed(pixel)-GetPixelGreen(pixel);
+ beta=GetPixelGreen(pixel)-GetPixelBlue(pixel);
+ if (((fabs(GetPixelRed(pixel)) <= MagickEpsilon) ||
+ (fabs(GetPixelRed(pixel)-QuantumRange) <= MagickEpsilon)) &&
(fabs(alpha) <= MagickEpsilon) && (fabs(beta) <= MagickEpsilon))
return(MagickTrue);
}
static inline void SetMagickPixelPacket(const Image *image,
const PixelPacket *color,const IndexPacket *index,MagickPixelPacket *pixel)
{
- pixel->red=(MagickRealType) GetRedPixelComponent(color);
- pixel->green=(MagickRealType) GetGreenPixelComponent(color);
- pixel->blue=(MagickRealType) GetBluePixelComponent(color);
- pixel->opacity=(MagickRealType) GetOpacityPixelComponent(color);
+ pixel->red=(MagickRealType) GetPixelRed(color);
+ pixel->green=(MagickRealType) GetPixelGreen(color);
+ pixel->blue=(MagickRealType) GetPixelBlue(color);
+ pixel->opacity=(MagickRealType) GetPixelOpacity(color);
if ((image->colorspace == CMYKColorspace) &&
(index != (const IndexPacket *) NULL))
- pixel->index=(MagickRealType) GetIndexPixelComponent(index);
+ pixel->index=(MagickRealType) GetPixelIndex(index);
}
static inline void SetMagickPixelPacketBias(const Image *image,
static inline void SetPixelPacket(const Image *image,
const MagickPixelPacket *pixel,PixelPacket *color,IndexPacket *index)
{
- SetRedPixelComponent(color,ClampToQuantum(pixel->red));
- SetGreenPixelComponent(color,ClampToQuantum(pixel->green));
- SetBluePixelComponent(color,ClampToQuantum(pixel->blue));
- SetOpacityPixelComponent(color,ClampToQuantum(pixel->opacity));
+ SetPixelRed(color,ClampToQuantum(pixel->red));
+ SetPixelGreen(color,ClampToQuantum(pixel->green));
+ SetPixelBlue(color,ClampToQuantum(pixel->blue));
+ SetPixelOpacity(color,ClampToQuantum(pixel->opacity));
if ((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass))
- SetIndexPixelComponent(index,ClampToQuantum(pixel->index));
+ SetPixelIndex(index,ClampToQuantum(pixel->index));
}
#if defined(__cplusplus) || defined(c_plusplus)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar((Quantum) (GetPixelAlpha(p)));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
*q++=ScaleQuantumToChar((Quantum) 0);
p++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar((Quantum) (GetPixelAlpha(p)));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
*q++=ScaleQuantumToChar((Quantum) 0);
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q=ScaleQuantumToChar(GetPixelRed(p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=ScaleQuantumToChar(GetGreenPixelComponent(p));
+ *q=ScaleQuantumToChar(GetPixelGreen(p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q=ScaleQuantumToChar(GetPixelBlue(p));
break;
}
case AlphaQuantum:
{
- *q=ScaleQuantumToChar((Quantum) (GetAlphaPixelComponent(p)));
+ *q=ScaleQuantumToChar((Quantum) (GetPixelAlpha(p)));
break;
}
case OpacityQuantum:
{
- *q=ScaleQuantumToChar(GetOpacityPixelComponent(p));
+ *q=ScaleQuantumToChar(GetPixelOpacity(p));
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=ScaleQuantumToChar(GetIndexPixelComponent(indexes+x));
+ *q=ScaleQuantumToChar(GetPixelIndex(indexes+x));
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(double) (QuantumScale*GetBluePixelComponent(p));
- *q++=(double) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(double) (QuantumScale*GetRedPixelComponent(p));
+ *q++=(double) (QuantumScale*GetPixelBlue(p));
+ *q++=(double) (QuantumScale*GetPixelGreen(p));
+ *q++=(double) (QuantumScale*GetPixelRed(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(double) (QuantumScale*GetBluePixelComponent(p));
- *q++=(double) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(double) (QuantumScale*GetRedPixelComponent(p));
+ *q++=(double) (QuantumScale*GetPixelBlue(p));
+ *q++=(double) (QuantumScale*GetPixelGreen(p));
+ *q++=(double) (QuantumScale*GetPixelRed(p));
*q++=(double) (QuantumScale*((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p))));
+ GetPixelOpacity(p))));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(double) (QuantumScale*GetBluePixelComponent(p));
- *q++=(double) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(double) (QuantumScale*GetRedPixelComponent(p));
+ *q++=(double) (QuantumScale*GetPixelBlue(p));
+ *q++=(double) (QuantumScale*GetPixelGreen(p));
+ *q++=(double) (QuantumScale*GetPixelRed(p));
*q++=0.0;
p++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(double) (QuantumScale*GetRedPixelComponent(p));
- *q++=(double) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(double) (QuantumScale*GetBluePixelComponent(p));
+ *q++=(double) (QuantumScale*GetPixelRed(p));
+ *q++=(double) (QuantumScale*GetPixelGreen(p));
+ *q++=(double) (QuantumScale*GetPixelBlue(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(double) (QuantumScale*GetRedPixelComponent(p));
- *q++=(double) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(double) (QuantumScale*GetBluePixelComponent(p));
+ *q++=(double) (QuantumScale*GetPixelRed(p));
+ *q++=(double) (QuantumScale*GetPixelGreen(p));
+ *q++=(double) (QuantumScale*GetPixelBlue(p));
*q++=(double) (QuantumScale*((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p))));
+ GetPixelOpacity(p))));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(double) (QuantumScale*GetRedPixelComponent(p));
- *q++=(double) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(double) (QuantumScale*GetBluePixelComponent(p));
+ *q++=(double) (QuantumScale*GetPixelRed(p));
+ *q++=(double) (QuantumScale*GetPixelGreen(p));
+ *q++=(double) (QuantumScale*GetPixelBlue(p));
*q++=0.0;
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=(double) (QuantumScale*GetRedPixelComponent(p));
+ *q=(double) (QuantumScale*GetPixelRed(p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=(double) (QuantumScale*GetGreenPixelComponent(p));
+ *q=(double) (QuantumScale*GetPixelGreen(p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=(double) (QuantumScale*GetBluePixelComponent(p));
+ *q=(double) (QuantumScale*GetPixelBlue(p));
break;
}
case AlphaQuantum:
{
*q=(double) (QuantumScale*((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p))));
+ GetPixelOpacity(p))));
break;
}
case OpacityQuantum:
{
- *q=(double) (QuantumScale*GetOpacityPixelComponent(p));
+ *q=(double) (QuantumScale*GetPixelOpacity(p));
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=(double) (QuantumScale*GetIndexPixelComponent(indexes+x));
+ *q=(double) (QuantumScale*GetPixelIndex(indexes+x));
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(float) (QuantumScale*GetBluePixelComponent(p));
- *q++=(float) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(float) (QuantumScale*GetRedPixelComponent(p));
+ *q++=(float) (QuantumScale*GetPixelBlue(p));
+ *q++=(float) (QuantumScale*GetPixelGreen(p));
+ *q++=(float) (QuantumScale*GetPixelRed(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(float) (QuantumScale*GetBluePixelComponent(p));
- *q++=(float) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(float) (QuantumScale*GetRedPixelComponent(p));
- *q++=(float) (QuantumScale*(Quantum) (GetAlphaPixelComponent(p)));
+ *q++=(float) (QuantumScale*GetPixelBlue(p));
+ *q++=(float) (QuantumScale*GetPixelGreen(p));
+ *q++=(float) (QuantumScale*GetPixelRed(p));
+ *q++=(float) (QuantumScale*(Quantum) (GetPixelAlpha(p)));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(float) (QuantumScale*GetBluePixelComponent(p));
- *q++=(float) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(float) (QuantumScale*GetRedPixelComponent(p));
+ *q++=(float) (QuantumScale*GetPixelBlue(p));
+ *q++=(float) (QuantumScale*GetPixelGreen(p));
+ *q++=(float) (QuantumScale*GetPixelRed(p));
*q++=0.0;
p++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(float) (QuantumScale*GetRedPixelComponent(p));
- *q++=(float) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(float) (QuantumScale*GetBluePixelComponent(p));
+ *q++=(float) (QuantumScale*GetPixelRed(p));
+ *q++=(float) (QuantumScale*GetPixelGreen(p));
+ *q++=(float) (QuantumScale*GetPixelBlue(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(float) (QuantumScale*GetRedPixelComponent(p));
- *q++=(float) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(float) (QuantumScale*GetBluePixelComponent(p));
- *q++=(float) (QuantumScale*((Quantum) (GetAlphaPixelComponent(p))));
+ *q++=(float) (QuantumScale*GetPixelRed(p));
+ *q++=(float) (QuantumScale*GetPixelGreen(p));
+ *q++=(float) (QuantumScale*GetPixelBlue(p));
+ *q++=(float) (QuantumScale*((Quantum) (GetPixelAlpha(p))));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(float) (QuantumScale*GetRedPixelComponent(p));
- *q++=(float) (QuantumScale*GetGreenPixelComponent(p));
- *q++=(float) (QuantumScale*GetBluePixelComponent(p));
+ *q++=(float) (QuantumScale*GetPixelRed(p));
+ *q++=(float) (QuantumScale*GetPixelGreen(p));
+ *q++=(float) (QuantumScale*GetPixelBlue(p));
*q++=0.0;
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=(float) (QuantumScale*GetRedPixelComponent(p));
+ *q=(float) (QuantumScale*GetPixelRed(p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=(float) (QuantumScale*GetGreenPixelComponent(p));
+ *q=(float) (QuantumScale*GetPixelGreen(p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=(float) (QuantumScale*GetBluePixelComponent(p));
+ *q=(float) (QuantumScale*GetPixelBlue(p));
break;
}
case AlphaQuantum:
{
- *q=(float) (QuantumScale*((Quantum) (GetAlphaPixelComponent(p))));
+ *q=(float) (QuantumScale*((Quantum) (GetPixelAlpha(p))));
break;
}
case OpacityQuantum:
{
- *q=(float) (QuantumScale*GetOpacityPixelComponent(p));
+ *q=(float) (QuantumScale*GetPixelOpacity(p));
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=(float) (QuantumScale*GetIndexPixelComponent(indexes+x));
+ *q=(float) (QuantumScale*GetPixelIndex(indexes+x));
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
*q++=(unsigned int) ScaleQuantumToLong((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
*q++=0U;
p++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
*q++=(unsigned int) ScaleQuantumToLong((Quantum)
- (GetAlphaPixelComponent(p)));
+ (GetPixelAlpha(p)));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
*q++=0U;
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
+ *q=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
break;
}
case AlphaQuantum:
{
*q=(unsigned int) ScaleQuantumToLong((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
break;
}
case OpacityQuantum:
{
- *q=(unsigned int) ScaleQuantumToLong(GetOpacityPixelComponent(p));
+ *q=(unsigned int) ScaleQuantumToLong(GetPixelOpacity(p));
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=(unsigned int) ScaleQuantumToLong(GetIndexPixelComponent(indexes+x));
+ *q=(unsigned int) ScaleQuantumToLong(GetPixelIndex(indexes+x));
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=ScaleQuantumToLong((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
+ *q++=ScaleQuantumToLong((Quantum) (GetPixelAlpha(p)));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
*q++=0;
p++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=ScaleQuantumToLong((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=ScaleQuantumToLong((Quantum) (GetPixelAlpha(p)));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
*q++=0;
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q=ScaleQuantumToLong(GetPixelRed(p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=ScaleQuantumToLong(GetGreenPixelComponent(p));
+ *q=ScaleQuantumToLong(GetPixelGreen(p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q=ScaleQuantumToLong(GetPixelBlue(p));
break;
}
case AlphaQuantum:
{
- *q=ScaleQuantumToLong((Quantum) (GetAlphaPixelComponent(p)));
+ *q=ScaleQuantumToLong((Quantum) (GetPixelAlpha(p)));
break;
}
case OpacityQuantum:
{
- *q=ScaleQuantumToLong(GetOpacityPixelComponent(p));
+ *q=ScaleQuantumToLong(GetPixelOpacity(p));
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=ScaleQuantumToLong(GetIndexPixelComponent(indexes+x));
+ *q=ScaleQuantumToLong(GetPixelIndex(indexes+x));
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=GetBluePixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetRedPixelComponent(p);
+ *q++=GetPixelBlue(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelRed(p);
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=GetBluePixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetRedPixelComponent(p);
- *q++=(Quantum) (GetAlphaPixelComponent(p));
+ *q++=GetPixelBlue(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelRed(p);
+ *q++=(Quantum) (GetPixelAlpha(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=GetBluePixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetRedPixelComponent(p);
+ *q++=GetPixelBlue(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelRed(p);
*q++=(Quantum) 0;
p++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=GetRedPixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetBluePixelComponent(p);
+ *q++=GetPixelRed(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelBlue(p);
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=GetRedPixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetBluePixelComponent(p);
- *q++=(Quantum) (GetAlphaPixelComponent(p));
+ *q++=GetPixelRed(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelBlue(p);
+ *q++=(Quantum) (GetPixelAlpha(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=GetRedPixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetBluePixelComponent(p);
+ *q++=GetPixelRed(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelBlue(p);
*q++=(Quantum) 0;
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=GetRedPixelComponent(p);
+ *q=GetPixelRed(p);
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=GetGreenPixelComponent(p);
+ *q=GetPixelGreen(p);
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=GetBluePixelComponent(p);
+ *q=GetPixelBlue(p);
break;
}
case AlphaQuantum:
{
- *q=(Quantum) (GetAlphaPixelComponent(p));
+ *q=(Quantum) (GetPixelAlpha(p));
break;
}
case OpacityQuantum:
{
- *q=GetOpacityPixelComponent(p);
+ *q=GetPixelOpacity(p);
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=GetIndexPixelComponent(indexes+x);
+ *q=GetPixelIndex(indexes+x);
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
- *q++=ScaleQuantumToShort((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
+ *q++=ScaleQuantumToShort((Quantum) (GetPixelAlpha(p)));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
*q++=0;
p++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
- *q++=ScaleQuantumToShort((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
+ *q++=ScaleQuantumToShort((Quantum) (GetPixelAlpha(p)));
p++;
}
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
*q++=0;
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=ScaleQuantumToShort(GetRedPixelComponent(p));
+ *q=ScaleQuantumToShort(GetPixelRed(p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=ScaleQuantumToShort(GetGreenPixelComponent(p));
+ *q=ScaleQuantumToShort(GetPixelGreen(p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=ScaleQuantumToShort(GetBluePixelComponent(p));
+ *q=ScaleQuantumToShort(GetPixelBlue(p));
break;
}
case AlphaQuantum:
{
- *q=ScaleQuantumToShort((Quantum) (GetAlphaPixelComponent(p)));
+ *q=ScaleQuantumToShort((Quantum) (GetPixelAlpha(p)));
break;
}
case OpacityQuantum:
{
- *q=ScaleQuantumToShort(GetOpacityPixelComponent(p));
+ *q=ScaleQuantumToShort(GetPixelOpacity(p));
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=ScaleQuantumToShort(GetIndexPixelComponent(indexes+x));
+ *q=ScaleQuantumToShort(GetPixelIndex(indexes+x));
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelAlpha(q,ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetOpacityPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelOpacity(q,ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelAlpha(q,ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
- SetOpacityPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
+ SetPixelOpacity(q,ScaleCharToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
- SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
+ SetPixelRed(q,ScaleCharToQuantum(*p++));
+ SetPixelGreen(q,ScaleCharToQuantum(*p++));
+ SetPixelBlue(q,ScaleCharToQuantum(*p++));
p++;
q++;
}
case RedQuantum:
case CyanQuantum:
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p));
+ SetPixelRed(q,ScaleCharToQuantum(*p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- SetGreenPixelComponent(q,ScaleCharToQuantum(*p));
+ SetPixelGreen(q,ScaleCharToQuantum(*p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- SetBluePixelComponent(q,ScaleCharToQuantum(*p));
+ SetPixelBlue(q,ScaleCharToQuantum(*p));
break;
}
case AlphaQuantum:
{
- SetAlphaPixelComponent(q,ScaleCharToQuantum(*p));
+ SetPixelAlpha(q,ScaleCharToQuantum(*p));
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,ScaleCharToQuantum(*p));
+ SetPixelOpacity(q,ScaleCharToQuantum(*p));
break;
}
case BlackQuantum:
{
- SetIndexPixelComponent(indexes+x,ScaleCharToQuantum(*p));
+ SetPixelIndex(indexes+x,ScaleCharToQuantum(*p));
break;
}
case IndexQuantum:
{
- SetRedPixelComponent(q,ScaleCharToQuantum(*p));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleCharToQuantum(*p));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
break;
}
default:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
q++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
q->opacity=(Quantum) QuantumRange-ClampToQuantum((MagickRealType)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
p++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType) QuantumRange*(*p)));
+ SetPixelGreen(q,ClampToQuantum((MagickRealType) QuantumRange*(*p)));
p++;
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType) QuantumRange*(*p)));
+ SetPixelBlue(q,ClampToQuantum((MagickRealType) QuantumRange*(*p)));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
q++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
q++;
case RedQuantum:
case CyanQuantum:
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
break;
}
case AlphaQuantum:
{
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelOpacity(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
break;
}
case BlackQuantum:
{
- SetIndexPixelComponent(indexes+x,ClampToQuantum(
+ SetPixelIndex(indexes+x,ClampToQuantum(
(MagickRealType) QuantumRange*(*p)));
break;
}
case IndexQuantum:
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
break;
}
default:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
q++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
q++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
p++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
q++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
q++;
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
p++;
q++;
case RedQuantum:
case CyanQuantum:
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
break;
}
case AlphaQuantum:
{
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelOpacity(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
break;
}
case BlackQuantum:
{
- SetIndexPixelComponent(indexes+x,ClampToQuantum(
+ SetPixelIndex(indexes+x,ClampToQuantum(
(MagickRealType) QuantumRange*(*p)));
break;
}
case IndexQuantum:
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*(*p)));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
break;
}
default:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
- SetAlphaPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
+ SetPixelAlpha(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
- SetAlphaPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
+ SetPixelAlpha(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
p++;
q++;
}
case RedQuantum:
case CyanQuantum:
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p));
+ SetPixelRed(q,ScaleLongToQuantum(*p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p));
+ SetPixelGreen(q,ScaleLongToQuantum(*p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- SetBluePixelComponent(q,ScaleLongToQuantum(*p));
+ SetPixelBlue(q,ScaleLongToQuantum(*p));
break;
}
case AlphaQuantum:
{
- SetAlphaPixelComponent(q,ScaleLongToQuantum(*p));
+ SetPixelAlpha(q,ScaleLongToQuantum(*p));
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,ScaleLongToQuantum(*p));
+ SetPixelOpacity(q,ScaleLongToQuantum(*p));
break;
}
case BlackQuantum:
{
- SetIndexPixelComponent(indexes+x,ScaleLongToQuantum(*p));
+ SetPixelIndex(indexes+x,ScaleLongToQuantum(*p));
break;
}
case IndexQuantum:
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleLongToQuantum(*p));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
break;
}
default:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
- SetAlphaPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
+ SetPixelAlpha(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
- SetAlphaPixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
+ SetPixelAlpha(q,ScaleLongToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p++));
- SetBluePixelComponent(q,ScaleLongToQuantum(*p++));
+ SetPixelRed(q,ScaleLongToQuantum(*p++));
+ SetPixelGreen(q,ScaleLongToQuantum(*p++));
+ SetPixelBlue(q,ScaleLongToQuantum(*p++));
p++;
q++;
}
case RedQuantum:
case CyanQuantum:
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p));
+ SetPixelRed(q,ScaleLongToQuantum(*p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- SetGreenPixelComponent(q,ScaleLongToQuantum(*p));
+ SetPixelGreen(q,ScaleLongToQuantum(*p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- SetBluePixelComponent(q,ScaleLongToQuantum(*p));
+ SetPixelBlue(q,ScaleLongToQuantum(*p));
break;
}
case AlphaQuantum:
{
- SetAlphaPixelComponent(q,ScaleLongToQuantum(*p));
+ SetPixelAlpha(q,ScaleLongToQuantum(*p));
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,ScaleLongToQuantum(*p));
+ SetPixelOpacity(q,ScaleLongToQuantum(*p));
break;
}
case BlackQuantum:
{
- SetIndexPixelComponent(indexes+x,ScaleLongToQuantum(*p));
+ SetPixelIndex(indexes+x,ScaleLongToQuantum(*p));
break;
}
case IndexQuantum:
{
- SetRedPixelComponent(q,ScaleLongToQuantum(*p));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleLongToQuantum(*p));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
break;
}
default:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,*p++);
- SetGreenPixelComponent(q,*p++);
- SetRedPixelComponent(q,*p++);
+ SetPixelBlue(q,*p++);
+ SetPixelGreen(q,*p++);
+ SetPixelRed(q,*p++);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,*p++);
- SetGreenPixelComponent(q,*p++);
- SetRedPixelComponent(q,*p++);
- SetAlphaPixelComponent(q,*p++);
+ SetPixelBlue(q,*p++);
+ SetPixelGreen(q,*p++);
+ SetPixelRed(q,*p++);
+ SetPixelAlpha(q,*p++);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,*p++);
- SetGreenPixelComponent(q,*p++);
- SetRedPixelComponent(q,*p++);
+ SetPixelBlue(q,*p++);
+ SetPixelGreen(q,*p++);
+ SetPixelRed(q,*p++);
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,*p++);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,*p++);
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,*p++);
- SetGreenPixelComponent(q,*p++);
- SetBluePixelComponent(q,*p++);
+ SetPixelRed(q,*p++);
+ SetPixelGreen(q,*p++);
+ SetPixelBlue(q,*p++);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,*p++);
- SetGreenPixelComponent(q,*p++);
- SetBluePixelComponent(q,*p++);
- SetAlphaPixelComponent(q,*p++);
+ SetPixelRed(q,*p++);
+ SetPixelGreen(q,*p++);
+ SetPixelBlue(q,*p++);
+ SetPixelAlpha(q,*p++);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,*p++);
- SetGreenPixelComponent(q,*p++);
- SetBluePixelComponent(q,*p++);
+ SetPixelRed(q,*p++);
+ SetPixelGreen(q,*p++);
+ SetPixelBlue(q,*p++);
p++;
q++;
}
case RedQuantum:
case CyanQuantum:
{
- SetRedPixelComponent(q,*p);
+ SetPixelRed(q,*p);
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- SetGreenPixelComponent(q,*p);
+ SetPixelGreen(q,*p);
break;
}
case BlueQuantum:
case YellowQuantum:
{
- SetBluePixelComponent(q,*p);
+ SetPixelBlue(q,*p);
break;
}
case AlphaQuantum:
{
- SetAlphaPixelComponent(q,*p);
+ SetPixelAlpha(q,*p);
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,*p);
+ SetPixelOpacity(q,*p);
break;
}
case BlackQuantum:
{
- SetIndexPixelComponent(indexes+x,*p);
+ SetPixelIndex(indexes+x,*p);
break;
}
case IndexQuantum:
{
- SetRedPixelComponent(q,*p);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,*p);
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
break;
}
default:
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
- SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetPixelBlue(q,ScaleShortToQuantum(*p++));
+ SetPixelGreen(q,ScaleShortToQuantum(*p++));
+ SetPixelRed(q,ScaleShortToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
- SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
- SetAlphaPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetPixelBlue(q,ScaleShortToQuantum(*p++));
+ SetPixelGreen(q,ScaleShortToQuantum(*p++));
+ SetPixelRed(q,ScaleShortToQuantum(*p++));
+ SetPixelAlpha(q,ScaleShortToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
- SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetPixelBlue(q,ScaleShortToQuantum(*p++));
+ SetPixelGreen(q,ScaleShortToQuantum(*p++));
+ SetPixelRed(q,ScaleShortToQuantum(*p++));
p++;
q++;
}
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleShortToQuantum(*p++));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
- SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
+ SetPixelRed(q,ScaleShortToQuantum(*p++));
+ SetPixelGreen(q,ScaleShortToQuantum(*p++));
+ SetPixelBlue(q,ScaleShortToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
- SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
- SetAlphaPixelComponent(q,ScaleShortToQuantum(*p++));
+ SetPixelRed(q,ScaleShortToQuantum(*p++));
+ SetPixelGreen(q,ScaleShortToQuantum(*p++));
+ SetPixelBlue(q,ScaleShortToQuantum(*p++));
+ SetPixelAlpha(q,ScaleShortToQuantum(*p++));
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
for (x=0; x < (ssize_t) columns; x++)
{
- SetRedPixelComponent(q,ScaleShortToQuantum(*p++));
- SetGreenPixelComponent(q,ScaleShortToQuantum(*p++));
- SetBluePixelComponent(q,ScaleShortToQuantum(*p++));
+ SetPixelRed(q,ScaleShortToQuantum(*p++));
+ SetPixelGreen(q,ScaleShortToQuantum(*p++));
+ SetPixelBlue(q,ScaleShortToQuantum(*p++));
p++;
q++;
}
case RedQuantum:
case CyanQuantum:
{
- SetRedPixelComponent(q,ScaleShortToQuantum(*p));
+ SetPixelRed(q,ScaleShortToQuantum(*p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- SetGreenPixelComponent(q,ScaleShortToQuantum(*p));
+ SetPixelGreen(q,ScaleShortToQuantum(*p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- SetBluePixelComponent(q,ScaleShortToQuantum(*p));
+ SetPixelBlue(q,ScaleShortToQuantum(*p));
break;
}
case AlphaQuantum:
{
- SetAlphaPixelComponent(q,ScaleShortToQuantum(*p));
+ SetPixelAlpha(q,ScaleShortToQuantum(*p));
break;
}
case OpacityQuantum:
{
- SetOpacityPixelComponent(q,ScaleShortToQuantum(*p));
+ SetPixelOpacity(q,ScaleShortToQuantum(*p));
break;
}
case BlackQuantum:
{
- SetIndexPixelComponent(indexes+x,ScaleShortToQuantum(*p));
+ SetPixelIndex(indexes+x,ScaleShortToQuantum(*p));
break;
}
case IndexQuantum:
{
- SetRedPixelComponent(q,ScaleShortToQuantum(*p));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleShortToQuantum(*p));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
break;
}
default:
if (image->matte == MagickFalse)
{
*alpha=1.0;
- pixel->red=(MagickRealType) GetRedPixelComponent(color);
- pixel->green=(MagickRealType) GetGreenPixelComponent(color);
- pixel->blue=(MagickRealType) GetBluePixelComponent(color);
- pixel->opacity=(MagickRealType) GetOpacityPixelComponent(color);
+ pixel->red=(MagickRealType) GetPixelRed(color);
+ pixel->green=(MagickRealType) GetPixelGreen(color);
+ pixel->blue=(MagickRealType) GetPixelBlue(color);
+ pixel->opacity=(MagickRealType) GetPixelOpacity(color);
pixel->index=0.0;
if (((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass)) &&
(indexes != (const IndexPacket *) NULL))
- pixel->index=(MagickRealType) GetIndexPixelComponent(indexes);
+ pixel->index=(MagickRealType) GetPixelIndex(indexes);
return;
}
- *alpha=QuantumScale*GetAlphaPixelComponent(color);
- pixel->red=(*alpha*GetRedPixelComponent(color));
- pixel->green=(*alpha*GetGreenPixelComponent(color));
- pixel->blue=(*alpha*GetBluePixelComponent(color));
- pixel->opacity=(MagickRealType) GetOpacityPixelComponent(color);
+ *alpha=QuantumScale*GetPixelAlpha(color);
+ pixel->red=(*alpha*GetPixelRed(color));
+ pixel->green=(*alpha*GetPixelGreen(color));
+ pixel->blue=(*alpha*GetPixelBlue(color));
+ pixel->opacity=(MagickRealType) GetPixelOpacity(color);
pixel->index=0.0;
if (((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass)) &&
(indexes != (const IndexPacket *) NULL))
- pixel->index=(*alpha*GetIndexPixelComponent(indexes));
+ pixel->index=(*alpha*GetPixelIndex(indexes));
}
static void BicubicInterpolate(const MagickPixelPacket *pixels,const double dx,
#include <magick/colorspace.h>
#include <magick/constitute.h>
-#define ClampRedPixelComponent(pixel) ClampToQuantum((pixel)->red)
-#define ClampGreenPixelComponent(pixel) ClampToQuantum((pixel)->green)
-#define ClampBluePixelComponent(pixel) ClampToQuantum((pixel)->blue)
-#define ClampIndexPixelComponent(indexes) ClampToQuantum(*(indexes))
-#define ClampOpacityPixelComponent(pixel) ClampToQuantum((pixel)->opacity)
-#define GetAlphaPixelComponent(pixel) (QuantumRange-(pixel)->opacity)
-#define GetBlackPixelComponent(indexes) (*(indexes))
-#define GetBluePixelComponent(pixel) ((pixel)->blue)
-#define GetCbPixelComponent(pixel) ((pixel)->green)
-#define GetCrPixelComponent(pixel) ((pixel)->blue)
-#define GetCyanPixelComponent(pixel) ((pixel)->red)
-#define GetGrayPixelComponent(pixel) ((pixel)->red)
-#define GetGreenPixelComponent(pixel) ((pixel)->green)
-#define GetIndexPixelComponent(indexes) (*(indexes))
-#define GetMagentaPixelComponent(pixel) ((pixel)->green)
-#define GetNextPixel(pixel) ((pixel)+1)
-#define GetOpacityPixelComponent(pixel) ((pixel)->opacity)
-#define GetRedPixelComponent(pixel) ((pixel)->red)
-#define GetRGBPixelComponents(pixel,packet) \
+#define ClampPixelRed(pixel) ClampToQuantum((pixel)->red)
+#define ClampPixelGreen(pixel) ClampToQuantum((pixel)->green)
+#define ClampPixelBlue(pixel) ClampToQuantum((pixel)->blue)
+#define ClampPixelIndex(indexes) ClampToQuantum(*(indexes))
+#define ClampPixelOpacity(pixel) ClampToQuantum((pixel)->opacity)
+#define GetPixelAlpha(pixel) (QuantumRange-(pixel)->opacity)
+#define GetPixelBlack(indexes) (*(indexes))
+#define GetPixelBlue(pixel) ((pixel)->blue)
+#define GetPixelCb(pixel) ((pixel)->green)
+#define GetPixelCr(pixel) ((pixel)->blue)
+#define GetPixelCyan(pixel) ((pixel)->red)
+#define GetPixelGray(pixel) ((pixel)->red)
+#define GetPixelGreen(pixel) ((pixel)->green)
+#define GetPixelIndex(indexes) (*(indexes))
+#define GetPixelMagenta(pixel) ((pixel)->green)
+#define GetPixelNext(pixel) ((pixel)+1)
+#define GetPixelOpacity(pixel) ((pixel)->opacity)
+#define GetPixelRed(pixel) ((pixel)->red)
+#define GetPixelRGB(pixel,packet) \
{ \
- (packet)->red=GetRedPixelComponent((pixel)); \
- (packet)->green=GetGreenPixelComponent((pixel)); \
- (packet)->blue=GetBluePixelComponent((pixel)); \
+ (packet)->red=GetPixelRed((pixel)); \
+ (packet)->green=GetPixelGreen((pixel)); \
+ (packet)->blue=GetPixelBlue((pixel)); \
}
-#define GetRGBOPixelComponents(pixel,packet) \
+#define GetPixelRGBO(pixel,packet) \
{ \
- (packet)->red=GetRedPixelComponent((pixel)); \
- (packet)->green=GetGreenPixelComponent((pixel)); \
- (packet)->blue=GetBluePixelComponent((pixel)); \
- (packet)->opacity=GetOpacityPixelComponent((pixel)); \
+ (packet)->red=GetPixelRed((pixel)); \
+ (packet)->green=GetPixelGreen((pixel)); \
+ (packet)->blue=GetPixelBlue((pixel)); \
+ (packet)->opacity=GetPixelOpacity((pixel)); \
}
-#define GetYPixelComponent(pixel) ((pixel)->red)
-#define GetYellowPixelComponent(pixel) ((pixel)->blue)
-#define SetAlphaPixelComponent(pixel,value) \
+#define GetPixelY(pixel) ((pixel)->red)
+#define GetPixelYellow(pixel) ((pixel)->blue)
+#define SetPixelAlpha(pixel,value) \
((pixel)->opacity=(Quantum) (QuantumRange-(value)))
-#define SetBlackPixelComponent(indexes,value) (*(indexes)=(Quantum) (value))
-#define SetBluePixelComponent(pixel,value) ((pixel)->blue=(Quantum) (value))
-#define SetCbPixelComponent(pixel,value) ((pixel)->green=(Quantum) (value))
-#define SetCrPixelComponent(pixel,value) ((pixel)->blue=(Quantum) (value))
-#define SetCyanPixelComponent(pixel,value) ((pixel)->red=(Quantum) (value))
-#define SetGrayPixelComponent(pixel,value) \
+#define SetPixelBlack(indexes,value) (*(indexes)=(Quantum) (value))
+#define SetPixelBlue(pixel,value) ((pixel)->blue=(Quantum) (value))
+#define SetPixelCb(pixel,value) ((pixel)->green=(Quantum) (value))
+#define SetPixelCr(pixel,value) ((pixel)->blue=(Quantum) (value))
+#define SetPixelCyan(pixel,value) ((pixel)->red=(Quantum) (value))
+#define SetPixelGray(pixel,value) \
((pixel)->red=(pixel)->green=(pixel)->blue=(Quantum) (value))
-#define SetGreenPixelComponent(pixel,value) ((pixel)->green=(Quantum) (value))
-#define SetIndexPixelComponent(indexes,value) (*(indexes)=(IndexPacket) (value))
-#define SetMagentaPixelComponent(pixel,value) ((pixel)->green=(Quantum) (value))
-#define SetOpacityPixelComponent(pixel,value) \
+#define SetPixelGreen(pixel,value) ((pixel)->green=(Quantum) (value))
+#define SetPixelIndex(indexes,value) (*(indexes)=(IndexPacket) (value))
+#define SetPixelMagenta(pixel,value) ((pixel)->green=(Quantum) (value))
+#define SetPixelOpacity(pixel,value) \
((pixel)->opacity=(Quantum) (value))
-#define SetRedPixelComponent(pixel,value) ((pixel)->red=(Quantum) (value))
-#define SetRGBPixelComponents(pixel,packet) \
+#define SetPixelRed(pixel,value) ((pixel)->red=(Quantum) (value))
+#define SetPixelRGB(pixel,packet) \
{ \
- SetRedPixelComponent(pixel,(packet)->red); \
- SetGreenPixelComponent(pixel,(packet)->green); \
- SetBluePixelComponent(pixel,(packet)->blue); \
+ SetPixelRed(pixel,(packet)->red); \
+ SetPixelGreen(pixel,(packet)->green); \
+ SetPixelBlue(pixel,(packet)->blue); \
}
-#define SetRGBAPixelComponents(pixel,packet) \
+#define SetPixelRGBA(pixel,packet) \
{ \
- SetRedPixelComponent(pixel,(packet)->red); \
- SetGreenPixelComponent(pixel,(packet)->green); \
- SetBluePixelComponent(pixel,(packet)->blue); \
- SetAlphaPixelComponent(pixel,(QuantumRange-(packet)->opacity)); \
+ SetPixelRed(pixel,(packet)->red); \
+ SetPixelGreen(pixel,(packet)->green); \
+ SetPixelBlue(pixel,(packet)->blue); \
+ SetPixelAlpha(pixel,(QuantumRange-(packet)->opacity)); \
}
-#define SetRGBOPixelComponents(pixel,packet) \
+#define SetPixelRGBO(pixel,packet) \
{ \
- SetRedPixelComponent(pixel,(packet)->red); \
- SetGreenPixelComponent(pixel,(packet)->green); \
- SetBluePixelComponent(pixel,(packet)->blue); \
- SetOpacityPixelComponent(pixel,(packet)->opacity); \
+ SetPixelRed(pixel,(packet)->red); \
+ SetPixelGreen(pixel,(packet)->green); \
+ SetPixelBlue(pixel,(packet)->blue); \
+ SetPixelOpacity(pixel,(packet)->opacity); \
}
-#define SetYellowPixelComponent(pixel,value) ((pixel)->blue=(Quantum) (value))
-#define SetYPixelComponent(pixel,value) ((pixel)->red=(Quantum) (value))
+#define SetPixelYellow(pixel,value) ((pixel)->blue=(Quantum) (value))
+#define SetPixelY(pixel,value) ((pixel)->red=(Quantum) (value))
typedef enum
{
typedef enum
{
- RedPixelComponent = 0,
- CyanPixelComponent = 0,
- GrayPixelComponent = 0,
- YPixelComponent = 0,
- GreenPixelComponent = 1,
- MagentaPixelComponent = 1,
- CbPixelComponent = 1,
- BluePixelComponent = 2,
- YellowPixelComponent = 2,
- CrPixelComponent = 2,
- AlphaPixelComponent = 3,
- BlackPixelComponent = 4,
- IndexPixelComponent = 4,
+ PixelRed = 0,
+ PixelCyan = 0,
+ PixelGray = 0,
+ PixelY = 0,
+ PixelGreen = 1,
+ PixelMagenta = 1,
+ PixelCb = 1,
+ PixelBlue = 2,
+ PixelYellow = 2,
+ PixelCr = 2,
+ PixelAlpha = 3,
+ PixelBlack = 4,
+ PixelIndex = 4,
MaskPixelComponent = 5
} PixelComponent;
indexes=GetCacheViewVirtualIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- density=(double) GetRedPixelComponent(p)+GetGreenPixelComponent(p)+
- GetBluePixelComponent(p)+GetIndexPixelComponent(indexes+x);
+ density=(double) GetPixelRed(p)+GetPixelGreen(p)+
+ GetPixelBlue(p)+GetPixelIndex(indexes+x);
if (density > total_ink_density)
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp critical (MagickCore_GetImageTotalInkDensity)
p=source_pixels[id];
for (x=0; x < (ssize_t) image->columns; x++)
{
- *p++=ScaleQuantumToShort(GetRedPixelComponent(q));
+ *p++=ScaleQuantumToShort(GetPixelRed(q));
if (source_channels > 1)
{
- *p++=ScaleQuantumToShort(GetGreenPixelComponent(q));
- *p++=ScaleQuantumToShort(GetBluePixelComponent(q));
+ *p++=ScaleQuantumToShort(GetPixelGreen(q));
+ *p++=ScaleQuantumToShort(GetPixelBlue(q));
}
if (source_channels > 3)
- *p++=ScaleQuantumToShort(GetIndexPixelComponent(indexes+x));
+ *p++=ScaleQuantumToShort(GetPixelIndex(indexes+x));
q++;
}
cmsDoTransform(transform[id],source_pixels[id],target_pixels[id],
q-=image->columns;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,ScaleShortToQuantum(*p));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleShortToQuantum(*p));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p++;
if (target_channels > 1)
{
- SetGreenPixelComponent(q,ScaleShortToQuantum(*p));
+ SetPixelGreen(q,ScaleShortToQuantum(*p));
p++;
- SetBluePixelComponent(q,ScaleShortToQuantum(*p));
+ SetPixelBlue(q,ScaleShortToQuantum(*p));
p++;
}
if (target_channels > 3)
{
- SetIndexPixelComponent(indexes+x,ScaleShortToQuantum(*p));
+ SetPixelIndex(indexes+x,ScaleShortToQuantum(*p));
p++;
}
q++;
if ((cube_info->associate_alpha == MagickFalse) ||
(pixel->opacity == OpaqueOpacity))
{
- alpha_pixel->red=(MagickRealType) GetRedPixelComponent(pixel);
- alpha_pixel->green=(MagickRealType) GetGreenPixelComponent(pixel);
- alpha_pixel->blue=(MagickRealType) GetBluePixelComponent(pixel);
- alpha_pixel->opacity=(MagickRealType) GetOpacityPixelComponent(pixel);
+ alpha_pixel->red=(MagickRealType) GetPixelRed(pixel);
+ alpha_pixel->green=(MagickRealType) GetPixelGreen(pixel);
+ alpha_pixel->blue=(MagickRealType) GetPixelBlue(pixel);
+ alpha_pixel->opacity=(MagickRealType) GetPixelOpacity(pixel);
return;
}
alpha=(MagickRealType) (QuantumScale*(QuantumRange-
- GetOpacityPixelComponent(pixel)));
- alpha_pixel->red=alpha*GetRedPixelComponent(pixel);
- alpha_pixel->green=alpha*GetGreenPixelComponent(pixel);
- alpha_pixel->blue=alpha*GetBluePixelComponent(pixel);
- alpha_pixel->opacity=(MagickRealType) GetOpacityPixelComponent(pixel);
+ GetPixelOpacity(pixel)));
+ alpha_pixel->red=alpha*GetPixelRed(pixel);
+ alpha_pixel->green=alpha*GetPixelGreen(pixel);
+ alpha_pixel->blue=alpha*GetPixelBlue(pixel);
+ alpha_pixel->opacity=(MagickRealType) GetPixelOpacity(pixel);
}
static inline Quantum ClampToUnsignedQuantum(const MagickRealType value)
id;
id=(size_t) (((ScaleQuantumToChar(ClampToUnsignedQuantum(
- GetRedPixelComponent(pixel))) >> index) & 0x01) |
+ GetPixelRed(pixel))) >> index) & 0x01) |
((ScaleQuantumToChar(ClampToUnsignedQuantum(
- GetGreenPixelComponent(pixel))) >> index) & 0x01) << 1 |
+ GetPixelGreen(pixel))) >> index) & 0x01) << 1 |
((ScaleQuantumToChar(ClampToUnsignedQuantum(
- GetBluePixelComponent(pixel))) >> index) & 0x01) << 2);
+ GetPixelBlue(pixel))) >> index) & 0x01) << 2);
if (cube_info->associate_alpha != MagickFalse)
id|=((ScaleQuantumToChar(ClampToUnsignedQuantum(
- GetOpacityPixelComponent(pixel))) >> index) & 0x1) << 3;
+ GetPixelOpacity(pixel))) >> index) & 0x1) << 3;
return(id);
}
static inline MagickBooleanType IsSameColor(const Image *image,
const PixelPacket *p,const PixelPacket *q)
{
- if ((GetRedPixelComponent(p) != GetRedPixelComponent(q)) ||
- (GetGreenPixelComponent(p) != GetGreenPixelComponent(q)) ||
- (GetBluePixelComponent(p) != GetBluePixelComponent(q)))
+ if ((GetPixelRed(p) != GetPixelRed(q)) ||
+ (GetPixelGreen(p) != GetPixelGreen(q)) ||
+ (GetPixelBlue(p) != GetPixelBlue(q)))
return(MagickFalse);
if ((image->matte != MagickFalse) &&
- (GetOpacityPixelComponent(p) != GetOpacityPixelComponent(q)))
+ (GetPixelOpacity(p) != GetPixelOpacity(q)))
return(MagickFalse);
return(MagickTrue);
}
for (i=0; i < (ssize_t) count; i++)
{
if (image->storage_class == PseudoClass)
- SetIndexPixelComponent(indexes+x+i,index);
+ SetPixelIndex(indexes+x+i,index);
if (cube.quantize_info->measure_error == MagickFalse)
{
- SetRGBPixelComponents(q,image->colormap+index);
+ SetPixelRGB(q,image->colormap+index);
if (cube.associate_alpha != MagickFalse)
- SetOpacityPixelComponent(q,image->colormap[index].opacity);
+ SetPixelOpacity(q,image->colormap[index].opacity);
}
q++;
}
{
intensity=(Quantum) (PixelIntensity(q) < ((MagickRealType)
QuantumRange/2.0) ? 0 : QuantumRange);
- SetRedPixelComponent(q,intensity);
- SetGreenPixelComponent(q,intensity);
- SetBluePixelComponent(q,intensity);
+ SetPixelRed(q,intensity);
+ SetPixelGreen(q,intensity);
+ SetPixelBlue(q,intensity);
q++;
}
}
beta=1.0;
if (cube_info->associate_alpha != MagickFalse)
{
- alpha=(MagickRealType) (QuantumScale*GetAlphaPixelComponent(p));
- beta=(MagickRealType) (QuantumScale*GetAlphaPixelComponent(q));
+ alpha=(MagickRealType) (QuantumScale*GetPixelAlpha(p));
+ beta=(MagickRealType) (QuantumScale*GetPixelAlpha(q));
}
- pixel=alpha*GetRedPixelComponent(p)-beta*GetRedPixelComponent(q);
+ pixel=alpha*GetPixelRed(p)-beta*GetPixelRed(q);
distance=pixel*pixel;
if (distance <= cube_info->distance)
{
- pixel=alpha*GetGreenPixelComponent(p)-beta*GetGreenPixelComponent(q);
+ pixel=alpha*GetPixelGreen(p)-beta*GetPixelGreen(q);
distance+=pixel*pixel;
if (distance <= cube_info->distance)
{
- pixel=alpha*GetBluePixelComponent(p)-beta*
- GetBluePixelComponent(q);
+ pixel=alpha*GetPixelBlue(p)-beta*
+ GetPixelBlue(q);
distance+=pixel*pixel;
if (distance <= cube_info->distance)
{
alpha=1.0/(fabs(alpha) <= MagickEpsilon ? 1.0 : alpha);
if (cube_info->associate_alpha == MagickFalse)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType) (alpha*
+ SetPixelRed(q,ClampToQuantum((MagickRealType) (alpha*
QuantumRange*node_info->total_color.red)));
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType) (alpha*
+ SetPixelGreen(q,ClampToQuantum((MagickRealType) (alpha*
QuantumRange*node_info->total_color.green)));
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType) (alpha*
+ SetPixelBlue(q,ClampToQuantum((MagickRealType) (alpha*
QuantumRange*node_info->total_color.blue)));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
}
else
{
opacity=(MagickRealType) (alpha*QuantumRange*
node_info->total_color.opacity);
- SetOpacityPixelComponent(q,ClampToQuantum(opacity));
+ SetPixelOpacity(q,ClampToQuantum(opacity));
if (q->opacity == OpaqueOpacity)
{
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType) (alpha*
+ SetPixelRed(q,ClampToQuantum((MagickRealType) (alpha*
QuantumRange*node_info->total_color.red)));
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType) (alpha*
+ SetPixelGreen(q,ClampToQuantum((MagickRealType) (alpha*
QuantumRange*node_info->total_color.green)));
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType) (alpha*
+ SetPixelBlue(q,ClampToQuantum((MagickRealType) (alpha*
QuantumRange*node_info->total_color.blue)));
}
else
gamma=(MagickRealType) (QuantumScale*(QuantumRange-
(MagickRealType) q->opacity));
gamma=1.0/(fabs(gamma) <= MagickEpsilon ? 1.0 : gamma);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType) (alpha*
+ SetPixelRed(q,ClampToQuantum((MagickRealType) (alpha*
gamma*QuantumRange*node_info->total_color.red)));
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType) (alpha*
+ SetPixelGreen(q,ClampToQuantum((MagickRealType) (alpha*
gamma*QuantumRange*node_info->total_color.green)));
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType) (
+ SetPixelBlue(q,ClampToQuantum((MagickRealType) (
alpha*gamma*QuantumRange*node_info->total_color.blue)));
if (node_info->number_unique > cube_info->transparent_pixels)
{
*/
index=(size_t) cube.cache[i];
if (image->storage_class == PseudoClass)
- SetIndexPixelComponent(indexes+u,index);
+ SetPixelIndex(indexes+u,index);
if (cube.quantize_info->measure_error == MagickFalse)
{
- SetRGBPixelComponents(q+u,image->colormap+index);
+ SetPixelRGB(q+u,image->colormap+index);
if (cube.associate_alpha != MagickFalse)
- SetOpacityPixelComponent(q+u,image->colormap[index].opacity);
+ SetPixelOpacity(q+u,image->colormap[index].opacity);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
status=MagickFalse;
*indexes=(IndexPacket) index;
if (cube_info->quantize_info->measure_error == MagickFalse)
{
- SetRGBPixelComponents(q,image->colormap+index);
+ SetPixelRGB(q,image->colormap+index);
if (cube_info->associate_alpha != MagickFalse)
- SetOpacityPixelComponent(q,image->colormap[index].opacity);
+ SetPixelOpacity(q,image->colormap[index].opacity);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
return(MagickFalse);
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- index=1UL*GetIndexPixelComponent(indexes+x);
+ index=1UL*GetPixelIndex(indexes+x);
if (image->matte != MagickFalse)
{
- alpha=(MagickRealType) (QuantumScale*(GetAlphaPixelComponent(p)));
+ alpha=(MagickRealType) (QuantumScale*(GetPixelAlpha(p)));
beta=(MagickRealType) (QuantumScale*(QuantumRange-
image->colormap[index].opacity));
}
- distance=fabs(alpha*GetRedPixelComponent(p)-beta*
+ distance=fabs(alpha*GetPixelRed(p)-beta*
image->colormap[index].red);
mean_error_per_pixel+=distance;
mean_error+=distance*distance;
if (distance > maximum_error)
maximum_error=distance;
- distance=fabs(alpha*GetGreenPixelComponent(p)-beta*
+ distance=fabs(alpha*GetPixelGreen(p)-beta*
image->colormap[index].green);
mean_error_per_pixel+=distance;
mean_error+=distance*distance;
if (distance > maximum_error)
maximum_error=distance;
- distance=fabs(alpha*GetBluePixelComponent(p)-beta*
+ distance=fabs(alpha*GetPixelBlue(p)-beta*
image->colormap[index].blue);
mean_error_per_pixel+=distance;
mean_error+=distance*distance;
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,PosterizePixel(GetRedPixelComponent(q)));
+ SetPixelRed(q,PosterizePixel(GetPixelRed(q)));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,PosterizePixel(GetGreenPixelComponent(q)));
+ SetPixelGreen(q,PosterizePixel(GetPixelGreen(q)));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,PosterizePixel(GetBluePixelComponent(q)));
+ SetPixelBlue(q,PosterizePixel(GetPixelBlue(q)));
if (((channel & OpacityChannel) != 0) &&
(image->matte == MagickTrue))
- SetOpacityPixelComponent(q,PosterizePixel(GetOpacityPixelComponent(q)));
+ SetPixelOpacity(q,PosterizePixel(GetPixelOpacity(q)));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,PosterizePixel(
- GetIndexPixelComponent(indexes+x)));
+ SetPixelIndex(indexes+x,PosterizePixel(
+ GetPixelIndex(indexes+x)));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
register size_t
intensity;
- intensity=ScaleQuantumToMap(GetRedPixelComponent(q));
+ intensity=ScaleQuantumToMap(GetPixelRed(q));
if (colormap_index[intensity] < 0)
{
#if defined(MAGICKCORE_OPENMP_SUPPORT)
if (colormap_index[intensity] < 0)
{
colormap_index[intensity]=(ssize_t) image->colors;
- image->colormap[image->colors].red=GetRedPixelComponent(q);
+ image->colormap[image->colors].red=GetPixelRed(q);
image->colormap[image->colors].green=
- GetGreenPixelComponent(q);
- image->colormap[image->colors].blue=GetBluePixelComponent(q);
+ GetPixelGreen(q);
+ image->colormap[image->colors].blue=GetPixelBlue(q);
image->colors++;
}
}
- SetIndexPixelComponent(indexes+x,colormap_index[intensity]);
+ SetPixelIndex(indexes+x,colormap_index[intensity]);
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
}
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(indexes+x,colormap_index[ScaleQuantumToMap(
- GetIndexPixelComponent(indexes+x))]);
+ SetPixelIndex(indexes+x,colormap_index[ScaleQuantumToMap(
+ GetPixelIndex(indexes+x))]);
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
status=MagickFalse;
}
q=(PixelPacket *) GetCacheViewVirtualPixelQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- alpha=QuantumScale*GetAlphaPixelComponent(q);
- SetRedPixelComponent(q,ClampToQuantum(alpha*GetRedPixelComponent(q)));
- SetGreenPixelComponent(q,ClampToQuantum(alpha*
- GetGreenPixelComponent(q)));
- SetBluePixelComponent(q,ClampToQuantum(alpha*GetBluePixelComponent(q)));
+ alpha=QuantumScale*GetPixelAlpha(q);
+ SetPixelRed(q,ClampToQuantum(alpha*GetPixelRed(q)));
+ SetPixelGreen(q,ClampToQuantum(alpha*GetPixelGreen(q)));
+ SetPixelBlue(q,ClampToQuantum(alpha*GetPixelBlue(q)));
q++;
}
}
q=(PixelPacket *) GetCacheViewVirtualPixelQueue(image_view);
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q->opacity=(Quantum) GetAlphaPixelComponent(q);
+ q->opacity=(Quantum) GetPixelAlpha(q);
q++;
}
}
q=GetAuthenticPixelQueue(image);
for (x=0; x < (ssize_t) number_pixels; x++)
{
- quantum=GetRedPixelComponent(q);
- SetRedPixelComponent(q,GetGreenPixelComponent(q));
- SetGreenPixelComponent(q,quantum);
+ quantum=GetPixelRed(q);
+ SetPixelRed(q,GetPixelGreen(q));
+ SetPixelGreen(q,quantum);
q++;
}
}
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopCharPixel((unsigned char) GetIndexPixelComponent(indexes+x),q);
+ q=PopCharPixel((unsigned char) GetPixelIndex(indexes+x),q);
q+=quantum_info->pad;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopShortPixel(endian,SinglePrecisionToHalf(QuantumScale*
- GetIndexPixelComponent(indexes+x)),q);
+ GetPixelIndex(indexes+x)),q);
q+=quantum_info->pad;
}
break;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopShortPixel(endian,(unsigned short) GetIndexPixelComponent(
+ q=PopShortPixel(endian,(unsigned short) GetPixelIndex(
indexes+x),q);
q+=quantum_info->pad;
}
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopFloatPixel(&quantum_state,(float) GetIndexPixelComponent(
+ q=PopFloatPixel(&quantum_state,(float) GetPixelIndex(
indexes+x),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopLongPixel(endian,(unsigned int) GetIndexPixelComponent(
+ q=PopLongPixel(endian,(unsigned int) GetPixelIndex(
indexes+x),q);
q+=quantum_info->pad;
}
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopDoublePixel(&quantum_state,(double) GetIndexPixelComponent(
+ q=PopDoublePixel(&quantum_state,(double) GetPixelIndex(
indexes+x),q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- GetIndexPixelComponent(indexes+x),q);
+ GetPixelIndex(indexes+x),q);
p++;
q+=quantum_info->pad;
}
{
pixel=(unsigned char) *indexes++;
*q=((pixel & 0x01) << 7);
- pixel=(unsigned char) (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity ?
+ pixel=(unsigned char) (GetPixelOpacity(p) == (Quantum) TransparentOpacity ?
1 : 0);
*q|=((pixel & 0x01) << 6);
p++;
pixel=(unsigned char) *indexes++;
*q|=((pixel & 0x01) << 5);
- pixel=(unsigned char) (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity ?
+ pixel=(unsigned char) (GetPixelOpacity(p) == (Quantum) TransparentOpacity ?
1 : 0);
*q|=((pixel & 0x01) << 4);
p++;
pixel=(unsigned char) *indexes++;
*q|=((pixel & 0x01) << 3);
- pixel=(unsigned char) (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity ?
+ pixel=(unsigned char) (GetPixelOpacity(p) == (Quantum) TransparentOpacity ?
1 : 0);
*q|=((pixel & 0x01) << 2);
p++;
pixel=(unsigned char) *indexes++;
*q|=((pixel & 0x01) << 1);
- pixel=(unsigned char) (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity ?
+ pixel=(unsigned char) (GetPixelOpacity(p) == (Quantum) TransparentOpacity ?
1 : 0);
*q|=((pixel & 0x01) << 0);
p++;
{
pixel=(unsigned char) *indexes++;
*q|=((pixel & 0x01) << (unsigned char) (bit+4));
- pixel=(unsigned char) (GetOpacityPixelComponent(p) == (Quantum)
+ pixel=(unsigned char) (GetPixelOpacity(p) == (Quantum)
TransparentOpacity ? 1 : 0);
*q|=((pixel & 0x01) << (unsigned char) (bit+4-1));
p++;
pixel=(unsigned char) *indexes++;
*q=((pixel & 0xf) << 4);
pixel=(unsigned char) (16*QuantumScale*((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)))+0.5);
+ GetPixelOpacity(p)))+0.5);
*q|=((pixel & 0xf) << 0);
p++;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopCharPixel((unsigned char) GetIndexPixelComponent(indexes+x),q);
+ q=PopCharPixel((unsigned char) GetPixelIndex(indexes+x),q);
pixel=ScaleQuantumToChar((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopShortPixel(endian,(unsigned short) GetIndexPixelComponent(
+ q=PopShortPixel(endian,(unsigned short) GetPixelIndex(
indexes+x),q);
pixel=SinglePrecisionToHalf(QuantumScale*
- GetAlphaPixelComponent(p));
+ GetPixelAlpha(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopShortPixel(endian,(unsigned short) GetIndexPixelComponent(
+ q=PopShortPixel(endian,(unsigned short) GetPixelIndex(
indexes+x),q);
pixel=ScaleQuantumToShort((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
float
pixel;
- q=PopFloatPixel(&quantum_state,(float) GetIndexPixelComponent(
+ q=PopFloatPixel(&quantum_state,(float) GetPixelIndex(
indexes+x),q);
- pixel=(float) (GetAlphaPixelComponent(p));
+ pixel=(float) (GetPixelAlpha(p));
q=PopFloatPixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopLongPixel(endian,(unsigned int) GetIndexPixelComponent(
+ q=PopLongPixel(endian,(unsigned int) GetPixelIndex(
indexes+x),q);
pixel=ScaleQuantumToLong((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
double
pixel;
- q=PopDoublePixel(&quantum_state,(double) GetIndexPixelComponent(
+ q=PopDoublePixel(&quantum_state,(double) GetPixelIndex(
indexes+x),q);
- pixel=(double) (GetAlphaPixelComponent(p));
+ pixel=(double) (GetPixelAlpha(p));
q=PopDoublePixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- GetIndexPixelComponent(indexes+x),q);
+ GetPixelIndex(indexes+x),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny((Quantum) (GetAlphaPixelComponent(p)),range),q);
+ ScaleQuantumToAny((Quantum) (GetPixelAlpha(p)),range),q);
p++;
q+=quantum_info->pad;
}
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopCharPixel(ScaleQuantumToChar(GetBluePixelComponent(p)),q);
- q=PopCharPixel(ScaleQuantumToChar(GetGreenPixelComponent(p)),q);
- q=PopCharPixel(ScaleQuantumToChar(GetRedPixelComponent(p)),q);
+ q=PopCharPixel(ScaleQuantumToChar(GetPixelBlue(p)),q);
+ q=PopCharPixel(ScaleQuantumToChar(GetPixelGreen(p)),q);
+ q=PopCharPixel(ScaleQuantumToChar(GetPixelRed(p)),q);
p++;
q+=quantum_info->pad;
}
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) (ScaleQuantumToAny(GetRedPixelComponent(p),range) << 22 |
- ScaleQuantumToAny(GetGreenPixelComponent(p),range) << 12 |
- ScaleQuantumToAny(GetBluePixelComponent(p),range) << 2);
+ pixel=(unsigned int) (
+ ScaleQuantumToAny(GetPixelRed(p),range) << 22 |
+ ScaleQuantumToAny(GetPixelGreen(p),range) << 12 |
+ ScaleQuantumToAny(GetPixelBlue(p),range) << 2);
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
p++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
p++;
q+=quantum_info->pad;
default:
case 0:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
break;
}
case 1:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
break;
}
case 2:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
p++;
break;
}
default:
case 0:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
break;
}
case 1:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
break;
}
case 2:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
p++;
break;
}
default:
case 0:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
break;
}
case 1:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
break;
}
case 2:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
p++;
break;
}
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
p++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetBluePixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetGreenPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetRedPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopFloatPixel(&quantum_state,(float) GetRedPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float) GetGreenPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float) GetBluePixelComponent(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelRed(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelGreen(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelBlue(p),q);
p++;
q+=quantum_info->pad;
}
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelBlue(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelGreen(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelRed(p));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopDoublePixel(&quantum_state,(double) GetRedPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double) GetGreenPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double) GetBluePixelComponent(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelRed(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelGreen(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelBlue(p),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetRedPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelRed(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetGreenPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelGreen(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetBluePixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelBlue(p),range),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToChar(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelBlue(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelGreen(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelRed(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar((Quantum) GetAlphaPixelComponent(p));
+ pixel=ScaleQuantumToChar((Quantum) GetPixelAlpha(p));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
{
switch (i)
{
- case 0: quantum=GetRedPixelComponent(p); break;
- case 1: quantum=GetGreenPixelComponent(p); break;
- case 2: quantum=GetBluePixelComponent(p); break;
- case 3: quantum=(Quantum) (QuantumRange-GetOpacityPixelComponent(p)); break;
+ case 0: quantum=GetPixelRed(p); break;
+ case 1: quantum=GetPixelGreen(p); break;
+ case 2: quantum=GetPixelBlue(p); break;
+ case 3: quantum=(Quantum) (QuantumRange-GetPixelOpacity(p)); break;
}
switch (n % 3)
{
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
pixel=(unsigned int) ScaleQuantumToAny((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)),range);
+ GetPixelOpacity(p)),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
p++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
pixel=(unsigned int) ScaleQuantumToAny((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)),range);
+ GetPixelOpacity(p)),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetBluePixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetGreenPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetRedPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetAlphaPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelAlpha(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort((Quantum) GetAlphaPixelComponent(p));
+ pixel=ScaleQuantumToShort((Quantum) GetPixelAlpha(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
float
pixel;
- q=PopFloatPixel(&quantum_state,(float) GetRedPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float) GetGreenPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float) GetBluePixelComponent(p),q);
- pixel=(float) GetAlphaPixelComponent(p);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelRed(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelGreen(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelBlue(p),q);
+ pixel=(float) GetPixelAlpha(p);
q=PopFloatPixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelBlue(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelGreen(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelRed(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong((Quantum) GetAlphaPixelComponent(p));
+ pixel=ScaleQuantumToLong((Quantum) GetPixelAlpha(p));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopDoublePixel(&quantum_state,(double) GetRedPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double) GetGreenPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double) GetBluePixelComponent(p),q);
- pixel=(double) GetAlphaPixelComponent(p);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelRed(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelGreen(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelBlue(p),q);
+ pixel=(double) GetPixelAlpha(p);
q=PopDoublePixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetBluePixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelBlue(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetGreenPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelGreen(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetRedPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelRed(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny((Quantum) GetAlphaPixelComponent(p),range),q);
+ ScaleQuantumToAny((Quantum) GetPixelAlpha(p),range),q);
p++;
q+=quantum_info->pad;
}
{
*q='\0';
*q|=(PixelIntensityToQuantum(p) > threshold ? black : white) << 7;
- pixel=(unsigned char) (GetOpacityPixelComponent(p) == OpaqueOpacity ? 0x00 : 0x01);
+ pixel=(unsigned char) (GetPixelOpacity(p) == OpaqueOpacity ? 0x00 : 0x01);
*q|=(((int) pixel != 0 ? 0x00 : 0x01) << 6);
p++;
*q|=(PixelIntensityToQuantum(p) > threshold ? black : white) << 5;
- pixel=(unsigned char) (GetOpacityPixelComponent(p) == OpaqueOpacity ? 0x00 : 0x01);
+ pixel=(unsigned char) (GetPixelOpacity(p) == OpaqueOpacity ? 0x00 : 0x01);
*q|=(((int) pixel != 0 ? 0x00 : 0x01) << 4);
p++;
*q|=(PixelIntensityToQuantum(p) > threshold ? black : white) << 3;
- pixel=(unsigned char) (GetOpacityPixelComponent(p) == OpaqueOpacity ? 0x00 : 0x01);
+ pixel=(unsigned char) (GetPixelOpacity(p) == OpaqueOpacity ? 0x00 : 0x01);
*q|=(((int) pixel != 0 ? 0x00 : 0x01) << 2);
p++;
*q|=(PixelIntensityToQuantum(p) > threshold ? black : white) << 1;
- pixel=(unsigned char) (GetOpacityPixelComponent(p) == OpaqueOpacity ? 0x00 : 0x01);
+ pixel=(unsigned char) (GetPixelOpacity(p) == OpaqueOpacity ? 0x00 : 0x01);
*q|=(((int) pixel != 0 ? 0x00 : 0x01) << 0);
p++;
q++;
{
*q|=(PixelIntensityToQuantum(p) > threshold ? black : white) <<
(7-bit);
- pixel=(unsigned char) (GetOpacityPixelComponent(p) == OpaqueOpacity ? 0x00 :
+ pixel=(unsigned char) (GetPixelOpacity(p) == OpaqueOpacity ? 0x00 :
0x01);
*q|=(((int) pixel != 0 ? 0x00 : 0x01) << (unsigned char)
(7-bit-1));
pixel=ScaleQuantumToChar(PixelIntensityToQuantum(p));
*q=(((pixel >> 4) & 0xf) << 4);
pixel=(unsigned char) (16*QuantumScale*((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)))+0.5);
+ GetPixelOpacity(p)))+0.5);
*q|=pixel & 0xf;
p++;
q++;
pixel=ScaleQuantumToChar(PixelIntensityToQuantum(p));
q=PopCharPixel(pixel,q);
pixel=ScaleQuantumToChar((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
PixelIntensityToQuantum(p));
q=PopShortPixel(endian,pixel,q);
pixel=SinglePrecisionToHalf(QuantumScale*
- GetAlphaPixelComponent(p));
+ GetPixelAlpha(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
pixel=ScaleQuantumToShort(PixelIntensityToQuantum(p));
q=PopShortPixel(endian,pixel,q);
pixel=ScaleQuantumToShort((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
pixel=(float) PixelIntensityToQuantum(p);
q=PopFloatPixel(&quantum_state,pixel,q);
- pixel=(float) (GetAlphaPixelComponent(p));
+ pixel=(float) (GetPixelAlpha(p));
q=PopFloatPixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
pixel=ScaleQuantumToLong(PixelIntensityToQuantum(p));
q=PopLongPixel(endian,pixel,q);
pixel=ScaleQuantumToLong((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
pixel=(double) PixelIntensityToQuantum(p);
q=PopDoublePixel(&quantum_state,pixel,q);
- pixel=(double) (GetAlphaPixelComponent(p));
+ pixel=(double) (GetPixelAlpha(p));
q=PopDoublePixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
ScaleQuantumToAny(PixelIntensityToQuantum(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny((Quantum) (GetAlphaPixelComponent(p)),range),q);
+ ScaleQuantumToAny((Quantum) (GetPixelAlpha(p)),range),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToChar(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelRed(p));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetRedPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopFloatPixel(&quantum_state,(float) GetRedPixelComponent(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelRed(p),q);
p++;
q+=quantum_info->pad;
}
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelRed(p));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopDoublePixel(&quantum_state,(double) GetRedPixelComponent(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelRed(p),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetRedPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelRed(p),range),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToChar(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelGreen(p));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
pixel=SinglePrecisionToHalf(QuantumScale*
- GetGreenPixelComponent(p));
+ GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopFloatPixel(&quantum_state,(float) GetGreenPixelComponent(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelGreen(p),q);
p++;
q+=quantum_info->pad;
}
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelGreen(p));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopDoublePixel(&quantum_state,(double) GetGreenPixelComponent(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelGreen(p),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetGreenPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelGreen(p),range),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToChar(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelBlue(p));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
pixel=SinglePrecisionToHalf(QuantumScale*
- GetBluePixelComponent(p));
+ GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopFloatPixel(&quantum_state,(float) GetBluePixelComponent(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelBlue(p),q);
p++;
q+=quantum_info->pad;
}
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelBlue(p));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopDoublePixel(&quantum_state,(double) GetBluePixelComponent(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelBlue(p),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetBluePixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelBlue(p),range),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
pixel=ScaleQuantumToChar((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
pixel=SinglePrecisionToHalf(QuantumScale*
- GetAlphaPixelComponent(p));
+ GetPixelAlpha(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
pixel=ScaleQuantumToShort((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
float
pixel;
- pixel=(float) (GetAlphaPixelComponent(p));
+ pixel=(float) (GetPixelAlpha(p));
q=PopFloatPixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
pixel=ScaleQuantumToLong((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
double
pixel;
- pixel=(double) (GetAlphaPixelComponent(p));
+ pixel=(double) (GetPixelAlpha(p));
q=PopDoublePixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny((Quantum) (GetAlphaPixelComponent(p)),range),q);
+ ScaleQuantumToAny((Quantum) (GetPixelAlpha(p)),range),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToChar(GetOpacityPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelOpacity(p));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
pixel=SinglePrecisionToHalf(QuantumScale*
- GetOpacityPixelComponent(p));
+ GetPixelOpacity(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetOpacityPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelOpacity(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopFloatPixel(&quantum_state,(float) GetOpacityPixelComponent(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelOpacity(p),q);
p++;
q+=quantum_info->pad;
}
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetOpacityPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelOpacity(p));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopDoublePixel(&quantum_state,(double) GetOpacityPixelComponent(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelOpacity(p),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetOpacityPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelOpacity(p),range),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToChar(GetIndexPixelComponent(indexes+x));
+ pixel=ScaleQuantumToChar(GetPixelIndex(indexes+x));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=SinglePrecisionToHalf(QuantumScale*GetIndexPixelComponent(
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelIndex(
indexes+x));
q=PopShortPixel(endian,pixel,q);
p++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetIndexPixelComponent(indexes+x));
+ pixel=ScaleQuantumToShort(GetPixelIndex(indexes+x));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopFloatPixel(&quantum_state,(float) GetIndexPixelComponent(
+ q=PopFloatPixel(&quantum_state,(float) GetPixelIndex(
indexes+x),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetIndexPixelComponent(indexes+x));
+ pixel=ScaleQuantumToLong(GetPixelIndex(indexes+x));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopDoublePixel(&quantum_state,(double) GetIndexPixelComponent(
+ q=PopDoublePixel(&quantum_state,(double) GetPixelIndex(
indexes+x),q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny((Quantum) GetIndexPixelComponent(indexes+x),
+ ScaleQuantumToAny((Quantum) GetPixelIndex(indexes+x),
range),q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopCharPixel(ScaleQuantumToChar(GetRedPixelComponent(p)),q);
- q=PopCharPixel(ScaleQuantumToChar(GetGreenPixelComponent(p)),q);
- q=PopCharPixel(ScaleQuantumToChar(GetBluePixelComponent(p)),q);
+ q=PopCharPixel(ScaleQuantumToChar(GetPixelRed(p)),q);
+ q=PopCharPixel(ScaleQuantumToChar(GetPixelGreen(p)),q);
+ q=PopCharPixel(ScaleQuantumToChar(GetPixelBlue(p)),q);
p++;
q+=quantum_info->pad;
}
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) (ScaleQuantumToAny(GetRedPixelComponent(p),range) << 22 |
- ScaleQuantumToAny(GetGreenPixelComponent(p),range) << 12 |
- ScaleQuantumToAny(GetBluePixelComponent(p),range) << 2);
+ pixel=(unsigned int) (ScaleQuantumToAny(GetPixelRed(p),range) << 22 |
+ ScaleQuantumToAny(GetPixelGreen(p),range) << 12 |
+ ScaleQuantumToAny(GetPixelBlue(p),range) << 2);
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
p++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
p++;
q+=quantum_info->pad;
default:
case 0:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
break;
}
case 1:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
break;
}
case 2:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
p++;
break;
}
default:
case 0:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
break;
}
case 1:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
break;
}
case 2:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
p++;
break;
}
default:
case 0:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
break;
}
case 1:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
break;
}
case 2:
{
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
p++;
break;
}
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
p++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetRedPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetGreenPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetBluePixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopFloatPixel(&quantum_state,(float) GetRedPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float) GetGreenPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float) GetBluePixelComponent(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelRed(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelGreen(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelBlue(p),q);
p++;
q+=quantum_info->pad;
}
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelRed(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelGreen(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelBlue(p));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopDoublePixel(&quantum_state,(double) GetRedPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double) GetGreenPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double) GetBluePixelComponent(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelRed(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelGreen(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelBlue(p),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetRedPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelRed(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetGreenPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelGreen(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetBluePixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelBlue(p),range),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToChar(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelRed(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelGreen(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelBlue(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar((Quantum) GetAlphaPixelComponent(p));
+ pixel=ScaleQuantumToChar((Quantum) GetPixelAlpha(p));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
{
switch (i)
{
- case 0: quantum=GetRedPixelComponent(p); break;
- case 1: quantum=GetGreenPixelComponent(p); break;
- case 2: quantum=GetBluePixelComponent(p); break;
- case 3: quantum=(Quantum) (QuantumRange-GetOpacityPixelComponent(p)); break;
+ case 0: quantum=GetPixelRed(p); break;
+ case 1: quantum=GetPixelGreen(p); break;
+ case 2: quantum=GetPixelBlue(p); break;
+ case 3: quantum=(Quantum) (QuantumRange-GetPixelOpacity(p)); break;
}
switch (n % 3)
{
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
pixel=(unsigned int) ScaleQuantumToAny((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)),range);
+ GetPixelOpacity(p)),range);
q=PopQuantumLongPixel(&quantum_state,quantum_info->depth,pixel,
q);
p++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=(unsigned int) ScaleQuantumToAny(GetRedPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelRed(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetGreenPixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelGreen(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
- pixel=(unsigned int) ScaleQuantumToAny(GetBluePixelComponent(p),range);
+ pixel=(unsigned int) ScaleQuantumToAny(GetPixelBlue(p),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
pixel=(unsigned int) ScaleQuantumToAny((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)),range);
+ GetPixelOpacity(p)),range);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetRedPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetGreenPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetBluePixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetAlphaPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelAlpha(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort((Quantum) GetAlphaPixelComponent(p));
+ pixel=ScaleQuantumToShort((Quantum) GetPixelAlpha(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
float
pixel;
- q=PopFloatPixel(&quantum_state,(float) GetRedPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float) GetGreenPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float) GetBluePixelComponent(p),q);
- pixel=(float) GetAlphaPixelComponent(p);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelRed(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelGreen(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelBlue(p),q);
+ pixel=(float) GetPixelAlpha(p);
q=PopFloatPixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelRed(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelGreen(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelBlue(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong((Quantum) GetAlphaPixelComponent(p));
+ pixel=ScaleQuantumToLong((Quantum) GetPixelAlpha(p));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q=PopDoublePixel(&quantum_state,(double) GetRedPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double) GetGreenPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double) GetBluePixelComponent(p),q);
- pixel=(double) GetAlphaPixelComponent(p);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelRed(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelGreen(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelBlue(p),q);
+ pixel=(double) GetPixelAlpha(p);
q=PopDoublePixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetRedPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelRed(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetGreenPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelGreen(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetBluePixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelBlue(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny((Quantum) GetAlphaPixelComponent(p),range),q);
+ ScaleQuantumToAny((Quantum) GetPixelAlpha(p),range),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToChar(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelRed(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelGreen(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelBlue(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar(GetIndexPixelComponent(indexes+x));
+ pixel=ScaleQuantumToChar(GetPixelIndex(indexes+x));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetRedPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetGreenPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetBluePixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*GetIndexPixelComponent(
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelIndex(
indexes+x));
q=PopShortPixel(endian,pixel,q);
p++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetIndexPixelComponent(indexes+x));
+ pixel=ScaleQuantumToShort(GetPixelIndex(indexes+x));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
+ q=PopFloatPixel(&quantum_state,(float) GetPixelRed(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelGreen(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelBlue(p),q);
q=PopFloatPixel(&quantum_state,(float)
- GetRedPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float)
- GetGreenPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float)
- GetBluePixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float)
- GetIndexPixelComponent(indexes+x),q);
+ GetPixelIndex(indexes+x),q);
p++;
q+=quantum_info->pad;
}
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelRed(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelGreen(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelBlue(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetIndexPixelComponent(indexes+x));
+ pixel=ScaleQuantumToLong(GetPixelIndex(indexes+x));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
+ q=PopDoublePixel(&quantum_state,(double) GetPixelRed(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelGreen(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelBlue(p),q);
q=PopDoublePixel(&quantum_state,(double)
- GetRedPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double)
- GetGreenPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double)
- GetBluePixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double)
- GetIndexPixelComponent(indexes+x),q);
+ GetPixelIndex(indexes+x),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetRedPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelRed(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetGreenPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelGreen(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetBluePixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelBlue(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetIndexPixelComponent(indexes+x),range),q);
+ ScaleQuantumToAny(GetPixelIndex(indexes+x),range),q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToChar(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelRed(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelGreen(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToChar(GetPixelBlue(p));
q=PopCharPixel(pixel,q);
- pixel=ScaleQuantumToChar(GetIndexPixelComponent(indexes+x));
+ pixel=ScaleQuantumToChar(GetPixelIndex(indexes+x));
q=PopCharPixel(pixel,q);
pixel=ScaleQuantumToChar((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopCharPixel(pixel,q);
p++;
q+=quantum_info->pad;
{
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetRedPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetGreenPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetBluePixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
pixel=SinglePrecisionToHalf(QuantumScale*
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
q=PopShortPixel(endian,pixel,q);
- pixel=SinglePrecisionToHalf(QuantumScale*
- GetAlphaPixelComponent(p));
+ pixel=SinglePrecisionToHalf(QuantumScale*GetPixelAlpha(p));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToShort(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelRed(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelGreen(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToShort(GetPixelBlue(p));
q=PopShortPixel(endian,pixel,q);
- pixel=ScaleQuantumToShort(GetIndexPixelComponent(indexes+x));
+ pixel=ScaleQuantumToShort(GetPixelIndex(indexes+x));
q=PopShortPixel(endian,pixel,q);
pixel=ScaleQuantumToShort((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopShortPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
float
pixel;
+ q=PopFloatPixel(&quantum_state,(float) GetPixelRed(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelGreen(p),q);
+ q=PopFloatPixel(&quantum_state,(float) GetPixelBlue(p),q);
q=PopFloatPixel(&quantum_state,(float)
- GetRedPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float)
- GetGreenPixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float)
- GetBluePixelComponent(p),q);
- q=PopFloatPixel(&quantum_state,(float)
- GetIndexPixelComponent(indexes+x),q);
- pixel=(float) (GetAlphaPixelComponent(p));
+ GetPixelIndex(indexes+x),q);
+ pixel=(float) (GetPixelAlpha(p));
q=PopFloatPixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
- pixel=ScaleQuantumToLong(GetRedPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelRed(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetGreenPixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelGreen(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetBluePixelComponent(p));
+ pixel=ScaleQuantumToLong(GetPixelBlue(p));
q=PopLongPixel(endian,pixel,q);
- pixel=ScaleQuantumToLong(GetIndexPixelComponent(indexes+x));
+ pixel=ScaleQuantumToLong(GetPixelIndex(indexes+x));
q=PopLongPixel(endian,pixel,q);
pixel=ScaleQuantumToLong((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
q=PopLongPixel(endian,pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
+ q=PopDoublePixel(&quantum_state,(double) GetPixelRed(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelGreen(p),q);
+ q=PopDoublePixel(&quantum_state,(double) GetPixelBlue(p),q);
q=PopDoublePixel(&quantum_state,(double)
- GetRedPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double)
- GetGreenPixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double)
- GetBluePixelComponent(p),q);
- q=PopDoublePixel(&quantum_state,(double)
- GetIndexPixelComponent(indexes+x),q);
- pixel=(double) (GetAlphaPixelComponent(p));
+ GetPixelIndex(indexes+x),q);
+ pixel=(double) (GetPixelAlpha(p));
q=PopDoublePixel(&quantum_state,pixel,q);
p++;
q+=quantum_info->pad;
for (x=0; x < (ssize_t) number_pixels; x++)
{
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetRedPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelRed(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetGreenPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelGreen(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetBluePixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelBlue(p),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetIndexPixelComponent(indexes+x),range),q);
+ ScaleQuantumToAny(GetPixelIndex(indexes+x),range),q);
q=PopQuantumPixel(&quantum_state,quantum_info->depth,
- ScaleQuantumToAny(GetOpacityPixelComponent(p),range),q);
+ ScaleQuantumToAny(GetPixelOpacity(p),range),q);
p++;
q+=quantum_info->pad;
}
{
case 0:
{
- quantum=GetRedPixelComponent(p);
+ quantum=GetPixelRed(p);
break;
}
case 1:
{
- quantum=GetGreenPixelComponent(p);
+ quantum=GetPixelGreen(p);
break;
}
case 2:
{
- quantum=GetBluePixelComponent(p);
+ quantum=GetPixelBlue(p);
break;
}
}
{
case 0:
{
- quantum=GetRedPixelComponent(p);
+ quantum=GetPixelRed(p);
break;
}
case 1:
{
- quantum=GetGreenPixelComponent(p);
+ quantum=GetPixelGreen(p);
break;
}
case 2:
{
- quantum=GetBluePixelComponent(p);
+ quantum=GetPixelBlue(p);
break;
}
}
q=(PixelPacket *) GetCacheViewVirtualPixelQueue(image_view);
for (x=0; x < (ssize_t) number_pixels; x++)
{
- quantum=GetRedPixelComponent(q);
- SetRedPixelComponent(q,GetGreenPixelComponent(q));
- SetGreenPixelComponent(q,quantum);
+ quantum=GetPixelRed(q);
+ SetPixelRed(q,GetPixelGreen(q));
+ SetPixelGreen(q,quantum);
q++;
}
}
q=(PixelPacket *) GetCacheViewVirtualPixelQueue(image_view);
for (x=0; x < (ssize_t) number_pixels; x++)
{
- q->opacity=(Quantum) GetAlphaPixelComponent(q);
+ SetPixelOpacity(q,(Quantum) GetPixelAlpha(q));
q++;
}
}
else
pixel=(unsigned char) (((*p) & (1 << (7-bit))) != 0 ?
0x00 : 0x01);
- SetIndexPixelComponent(indexes+x+bit,PushColormapIndex(image,
+ SetPixelIndex(indexes+x+bit,PushColormapIndex(image,
pixel,&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x+bit));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x+bit));
q++;
}
p++;
else
pixel=(unsigned char) (((*p) & (1 << (7-bit))) != 0 ?
0x00 : 0x01);
- SetIndexPixelComponent(indexes+x+bit,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x+bit,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x+bit));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x+bit));
q++;
}
break;
for (x=0; x < ((ssize_t) number_pixels-1); x+=2)
{
pixel=(unsigned char) ((*p >> 4) & 0xf);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
q++;
pixel=(unsigned char) ((*p) & 0xf);
- SetIndexPixelComponent(indexes+x+1,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x+1,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x+1));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x+1));
p++;
q++;
}
for (bit=0; bit < (ssize_t) (number_pixels % 2); bit++)
{
pixel=(unsigned char) ((*p++ >> 4) & 0xf);
- SetIndexPixelComponent(indexes+x+bit,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x+bit,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x+bit));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x+bit));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,
ClampToQuantum((MagickRealType) QuantumRange*
HalfToSinglePrecision(pixel)),&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,
ClampToQuantum(pixel),&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,
ClampToQuantum(pixel),&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p+=quantum_info->pad;
q++;
}
else
pixel=(unsigned char) (((*p) & (1 << (7-bit))) != 0 ?
0x00 : 0x01);
- SetIndexPixelComponent(indexes+x+bit/2,pixel == 0 ? 0 : 1);
- SetRedPixelComponent(q,pixel == 0 ? 0 : QuantumRange);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,((*p) & (1UL << (unsigned char)
+ SetPixelIndex(indexes+x+bit/2,pixel == 0 ? 0 : 1);
+ SetPixelRed(q,pixel == 0 ? 0 : QuantumRange);
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelOpacity(q,((*p) & (1UL << (unsigned char)
(6-bit))) == 0 ? TransparentOpacity : OpaqueOpacity);
q++;
}
else
pixel=(unsigned char) (((*p) & (1 << (7-bit))) != 0 ?
0x00 : 0x01);
- SetIndexPixelComponent(indexes+x+bit/2,pixel == 0 ? 0 : 1);
- SetRedPixelComponent(q,pixel == 0 ? 0 : QuantumRange);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,((*p) & (1UL << (unsigned char)
+ SetPixelIndex(indexes+x+bit/2,pixel == 0 ? 0 : 1);
+ SetPixelRed(q,pixel == 0 ? 0 : QuantumRange);
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelOpacity(q,((*p) & (1UL << (unsigned char)
(6-bit))) == 0 ? TransparentOpacity : OpaqueOpacity);
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
pixel=(unsigned char) ((*p >> 4) & 0xf);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
pixel=(unsigned char) ((*p) & 0xf);
- SetAlphaPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelAlpha(q,ScaleAnyToQuantum(pixel,range));
p++;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p=PushCharPixel(p,&pixel);
- SetAlphaPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelAlpha(q,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,
ClampToQuantum((MagickRealType) QuantumRange*
HalfToSinglePrecision(pixel)),&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelAlpha(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,
ClampToQuantum(pixel),&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p=PushLongPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelAlpha(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,
ClampToQuantum(pixel),&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
+ SetPixelIndex(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRGBOPixelComponents(q,image->colormap+(ssize_t)
- GetIndexPixelComponent(indexes+x));
+ SetPixelRGBO(q,image->colormap+(ssize_t)
+ GetPixelIndex(indexes+x));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetAlphaPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelAlpha(q,ScaleAnyToQuantum(pixel,range));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetBluePixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelBlue(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetGreenPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelGreen(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleCharToQuantum(pixel));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,ScaleCharToQuantum(pixel));
+ SetPixelOpacity(q,OpaqueOpacity);
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 22) & 0x3ff,
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 22) & 0x3ff,
range));
- SetGreenPixelComponent(q,ScaleAnyToQuantum((pixel >> 12) &
+ SetPixelGreen(q,ScaleAnyToQuantum((pixel >> 12) &
0x3ff,range));
- SetBluePixelComponent(q,ScaleAnyToQuantum((pixel >> 2) & 0x3ff,
+ SetPixelBlue(q,ScaleAnyToQuantum((pixel >> 2) & 0x3ff,
range));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
default:
case 0:
{
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelGreen(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelBlue(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
q++;
break;
default:
case 0:
{
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelGreen(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelBlue(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
q++;
break;
default:
case 0:
{
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelGreen(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelBlue(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
q++;
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelBlue(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelRed(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelBlue(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelGreen(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelRed(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetBluePixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelBlue(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetGreenPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelGreen(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelRed(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetAlphaPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelAlpha(q,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
}
switch (i)
{
- case 0: SetRedPixelComponent(q,quantum); break;
- case 1: SetGreenPixelComponent(q,quantum); break;
- case 2: SetBluePixelComponent(q,quantum); break;
- case 3: SetAlphaPixelComponent(q,quantum); break;
+ case 0: SetPixelRed(q,quantum); break;
+ case 1: SetPixelGreen(q,quantum); break;
+ case 2: SetPixelBlue(q,quantum); break;
+ case 3: SetPixelAlpha(q,quantum); break;
}
n++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelRed(q,ScaleShortToQuantum((unsigned short)
(pixel << 6)));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelGreen(q,ScaleShortToQuantum((unsigned short)
(pixel << 6)));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelBlue(q,ScaleShortToQuantum((unsigned short)
(pixel << 6)));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetAlphaPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelAlpha(q,ScaleShortToQuantum((unsigned short)
(pixel << 6)));
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelBlue(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelRed(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelAlpha(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelBlue(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelGreen(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelRed(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelAlpha(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetAlphaPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelAlpha(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
{
for (bit=0; bit < 8; bit++)
{
- SetRedPixelComponent(q,((*p) & (1 << (7-bit))) == 0 ?
+ SetPixelRed(q,((*p) & (1 << (7-bit))) == 0 ?
black : white);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
p++;
}
for (bit=0; bit < (ssize_t) (number_pixels % 8); bit++)
{
- SetRedPixelComponent(q,((*p) & (0x01 << (7-bit))) == 0 ?
+ SetPixelRed(q,((*p) & (0x01 << (7-bit))) == 0 ?
black : white);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (bit != 0)
for (x=0; x < ((ssize_t) number_pixels-1); x+=2)
{
pixel=(unsigned char) ((*p >> 4) & 0xf);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
pixel=(unsigned char) ((*p) & 0xf);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p++;
q++;
}
for (bit=0; bit < (ssize_t) (number_pixels % 2); bit++)
{
pixel=(unsigned char) (*p++ >> 4);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,QuantumRange-ScaleCharToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,QuantumRange-ScaleCharToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelOpacity(q,OpaqueOpacity);
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleCharToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,ScaleCharToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelOpacity(q,OpaqueOpacity);
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) (number_pixels-2); x+=3)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 2) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 2) &
0x3ff,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 12) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 12) &
0x3ff,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 22) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 22) &
0x3ff,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
p=PushLongPixel(endian,p,&pixel);
if (x++ < (ssize_t) (number_pixels-1))
{
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 2) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 2) &
0x3ff,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (x++ < (ssize_t) number_pixels)
{
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 12) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 12) &
0x3ff,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
break;
for (x=0; x < (ssize_t) (number_pixels-2); x+=3)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 22) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 22) &
0x3ff,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 12) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 12) &
0x3ff,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 2) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 2) &
0x3ff,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
p=PushLongPixel(endian,p,&pixel);
if (x++ < (ssize_t) (number_pixels-1))
{
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 22) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 22) &
0x3ff,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
if (x++ < (ssize_t) number_pixels)
{
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 12) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 12) &
0x3ff,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) (number_pixels-1); x+=2)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
for (bit=0; bit < (ssize_t) (number_pixels % 2); bit++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,QuantumRange-ScaleShortToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,QuantumRange-ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleLongToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleLongToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p+=quantum_info->pad;
q++;
}
{
pixel=(unsigned char)
(((*p) & (1 << (7-bit))) != 0 ? 0x00 : 0x01);
- SetRedPixelComponent(q,pixel == 0 ? 0 : QuantumRange);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,((*p) & (1UL << (unsigned char)
+ SetPixelRed(q,pixel == 0 ? 0 : QuantumRange);
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelOpacity(q,((*p) & (1UL << (unsigned char)
(6-bit))) == 0 ? TransparentOpacity : OpaqueOpacity);
q++;
}
for (bit=0; bit <= (ssize_t) (number_pixels % 4); bit+=2)
{
pixel=(unsigned char) (((*p) & (1 << (7-bit))) != 0 ? 0x00 : 0x01);
- SetRedPixelComponent(q,pixel != 0 ? 0 : QuantumRange);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,((*p) & (1UL << (unsigned char)
+ SetPixelRed(q,pixel != 0 ? 0 : QuantumRange);
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
+ SetPixelOpacity(q,((*p) & (1UL << (unsigned char)
(6-bit))) == 0 ? TransparentOpacity : OpaqueOpacity);
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
pixel=(unsigned char) ((*p >> 4) & 0xf);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
pixel=(unsigned char) ((*p) & 0xf);
- SetAlphaPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelAlpha(q,ScaleAnyToQuantum(pixel,range));
p++;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleCharToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleCharToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p=PushCharPixel(p,&pixel);
- SetAlphaPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelAlpha(q,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetOpacityPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelOpacity(q,ScaleAnyToQuantum(pixel,range));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetOpacityPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelOpacity(q,ScaleAnyToQuantum(pixel,range));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelAlpha(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleLongToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleLongToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p=PushLongPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelAlpha(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetAlphaPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelAlpha(q,ScaleAnyToQuantum(pixel,range));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelRed(q,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelRed(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelRed(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetGreenPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelGreen(q,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelGreen(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetBluePixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelBlue(q,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelBlue(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelBlue(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetAlphaPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelAlpha(q,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelAlpha(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelAlpha(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetAlphaPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelAlpha(q,ScaleAnyToQuantum(pixel,range));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleCharToQuantum(pixel));
+ SetPixelIndex(indexes+x,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,ClampToQuantum((MagickRealType)
+ SetPixelIndex(indexes+x,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleShortToQuantum(pixel));
+ SetPixelIndex(indexes+x,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetIndexPixelComponent(indexes+x,ClampToQuantum(pixel));
+ SetPixelIndex(indexes+x,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleLongToQuantum(pixel));
+ SetPixelIndex(indexes+x,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetIndexPixelComponent(indexes+x,ClampToQuantum(pixel));
+ SetPixelIndex(indexes+x,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleAnyToQuantum(pixel,range));
+ SetPixelIndex(indexes+x,ScaleAnyToQuantum(pixel,range));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelRed(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetGreenPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelGreen(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetBluePixelComponent(q,ScaleCharToQuantum(pixel));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelBlue(q,ScaleCharToQuantum(pixel));
+ SetPixelOpacity(q,OpaqueOpacity);
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum((pixel >> 22) &
+ SetPixelRed(q,ScaleAnyToQuantum((pixel >> 22) &
0x3ff,range));
- SetGreenPixelComponent(q,ScaleAnyToQuantum((pixel >> 12) &
+ SetPixelGreen(q,ScaleAnyToQuantum((pixel >> 12) &
0x3ff,range));
- SetBluePixelComponent(q,ScaleAnyToQuantum((pixel >> 2) &
+ SetPixelBlue(q,ScaleAnyToQuantum((pixel >> 2) &
0x3ff,range));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
default:
case 0:
{
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelGreen(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelBlue(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
q++;
break;
default:
case 0:
{
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelGreen(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelBlue(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
q++;
break;
default:
case 0:
{
- SetRedPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelRed(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 1:
{
- SetGreenPixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelGreen(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
break;
}
case 2:
{
- SetBluePixelComponent(q,ScaleAnyToQuantum((QuantumAny)
+ SetPixelBlue(q,ScaleAnyToQuantum((QuantumAny)
(pixel >> 4),range));
q++;
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumLongPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelRed(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelBlue(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelRed(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelGreen(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelBlue(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelRed(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetGreenPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelGreen(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetBluePixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelBlue(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetAlphaPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelAlpha(q,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
}
switch (i)
{
- case 0: SetRedPixelComponent(q,quantum); break;
- case 1: SetGreenPixelComponent(q,quantum); break;
- case 2: SetBluePixelComponent(q,quantum); break;
- case 3: SetAlphaPixelComponent(q,quantum); break;
+ case 0: SetPixelRed(q,quantum); break;
+ case 1: SetPixelGreen(q,quantum); break;
+ case 2: SetPixelBlue(q,quantum); break;
+ case 3: SetPixelAlpha(q,quantum); break;
}
n++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelRed(q,ScaleShortToQuantum((unsigned short)
(pixel << 6)));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelGreen(q,ScaleShortToQuantum((unsigned short)
(pixel << 6)));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelBlue(q,ScaleShortToQuantum((unsigned short)
(pixel << 6)));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetAlphaPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelAlpha(q,ScaleShortToQuantum((unsigned short)
(pixel << 6)));
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelRed(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelBlue(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelAlpha(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelRed(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelGreen(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelBlue(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelAlpha(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetAlphaPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelAlpha(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelRed(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetGreenPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelGreen(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetBluePixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelBlue(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleCharToQuantum(pixel));
+ SetPixelIndex(indexes+x,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,ClampToQuantum(
+ SetPixelIndex(indexes+x,ClampToQuantum(
(MagickRealType) QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelRed(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelBlue(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleShortToQuantum(pixel));
+ SetPixelIndex(indexes+x,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetIndexPixelComponent(indexes+x,ClampToQuantum(pixel));
+ SetPixelIndex(indexes+x,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelRed(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelGreen(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelBlue(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleLongToQuantum(pixel));
+ SetPixelIndex(indexes+x,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetIndexPixelComponent(indexes+x,ClampToQuantum(pixel));
+ SetPixelIndex(indexes+x,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleAnyToQuantum(pixel,range));
+ SetPixelIndex(indexes+x,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushCharPixel(p,&pixel);
- SetRedPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelRed(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetGreenPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelGreen(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetBluePixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelBlue(q,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleCharToQuantum(pixel));
+ SetPixelIndex(indexes+x,ScaleCharToQuantum(pixel));
p=PushCharPixel(p,&pixel);
- SetAlphaPixelComponent(q,ScaleCharToQuantum(pixel));
+ SetPixelAlpha(q,ScaleCharToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelRed(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelGreen(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelBlue(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,ClampToQuantum(
+ SetPixelIndex(indexes+x,ClampToQuantum(
(MagickRealType) QuantumRange*HalfToSinglePrecision(pixel)));
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum((MagickRealType)
+ SetPixelAlpha(q,ClampToQuantum((MagickRealType)
QuantumRange*HalfToSinglePrecision(pixel)));
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushShortPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelRed(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelBlue(q,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleShortToQuantum(pixel));
+ SetPixelIndex(indexes+x,ScaleShortToQuantum(pixel));
p=PushShortPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleShortToQuantum(pixel));
+ SetPixelAlpha(q,ScaleShortToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetIndexPixelComponent(indexes+x,ClampToQuantum(pixel));
+ SetPixelIndex(indexes+x,ClampToQuantum(pixel));
p=PushFloatPixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushLongPixel(endian,p,&pixel);
- SetRedPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelRed(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetGreenPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelGreen(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetBluePixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelBlue(q,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleLongToQuantum(pixel));
+ SetPixelIndex(indexes+x,ScaleLongToQuantum(pixel));
p=PushLongPixel(endian,p,&pixel);
- SetAlphaPixelComponent(q,ScaleLongToQuantum(pixel));
+ SetPixelAlpha(q,ScaleLongToQuantum(pixel));
p+=quantum_info->pad;
q++;
}
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetRedPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelRed(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetGreenPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelGreen(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetBluePixelComponent(q,ClampToQuantum(pixel));
+ SetPixelBlue(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetIndexPixelComponent(indexes+x,ClampToQuantum(pixel));
+ SetPixelIndex(indexes+x,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
- SetAlphaPixelComponent(q,ClampToQuantum(pixel));
+ SetPixelAlpha(q,ClampToQuantum(pixel));
p=PushDoublePixel(&quantum_state,p,&pixel);
p+=quantum_info->pad;
q++;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetBluePixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelBlue(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetIndexPixelComponent(indexes+x,ScaleAnyToQuantum(pixel,range));
+ SetPixelIndex(indexes+x,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetAlphaPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelAlpha(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
n++;
}
p+=quantum_info->pad;
- SetRedPixelComponent(q,cbcr[1]);
- SetGreenPixelComponent(q,cbcr[0]);
- SetBluePixelComponent(q,cbcr[2]);
+ SetPixelRed(q,cbcr[1]);
+ SetPixelGreen(q,cbcr[0]);
+ SetPixelBlue(q,cbcr[2]);
q++;
- SetRedPixelComponent(q,cbcr[3]);
- SetGreenPixelComponent(q,cbcr[0]);
- SetBluePixelComponent(q,cbcr[2]);
+ SetPixelRed(q,cbcr[3]);
+ SetPixelGreen(q,cbcr[0]);
+ SetPixelBlue(q,cbcr[2]);
q++;
}
break;
for (x=0; x < (ssize_t) number_pixels; x++)
{
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetRedPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelRed(q,ScaleAnyToQuantum(pixel,range));
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
- SetGreenPixelComponent(q,ScaleAnyToQuantum(pixel,range));
+ SetPixelGreen(q,ScaleAnyToQuantum(pixel,range));
q++;
}
break;
q=GetCacheViewAuthenticPixelQueue(image_view);
for (x=0; x < (ssize_t) number_pixels; x++)
{
- quantum=GetRedPixelComponent(q);
- SetRedPixelComponent(q,GetGreenPixelComponent(q));
- SetGreenPixelComponent(q,quantum);
+ quantum=GetPixelRed(q);
+ SetPixelRed(q,GetPixelGreen(q));
+ SetPixelGreen(q,quantum);
q++;
}
}
q=GetCacheViewAuthenticPixelQueue(image_view);
for (x=0; x < (ssize_t) number_pixels; x++)
{
- SetOpacityPixelComponent(q,GetAlphaPixelComponent(q));
+ SetPixelOpacity(q,GetPixelAlpha(q));
q++;
}
}
q=GetCacheViewAuthenticPixelQueue(image_view);
for (x=0; x < (ssize_t) number_pixels; x++)
{
- alpha=QuantumScale*GetAlphaPixelComponent(q);
+ alpha=QuantumScale*GetPixelAlpha(q);
alpha=1.0/(fabs(alpha) <= MagickEpsilon ? 1.0 : alpha);
- SetRedPixelComponent(q,ClampToQuantum(alpha*
- GetRedPixelComponent(q)));
- SetGreenPixelComponent(q,ClampToQuantum(alpha*
- GetGreenPixelComponent(q)));
- SetBluePixelComponent(q,ClampToQuantum(alpha*
- GetBluePixelComponent(q)));
+ SetPixelRed(q,ClampToQuantum(alpha*
+ GetPixelRed(q)));
+ SetPixelGreen(q,ClampToQuantum(alpha*
+ GetPixelGreen(q)));
+ SetPixelBlue(q,ClampToQuantum(alpha*
+ GetPixelBlue(q)));
q++;
}
}
j=y*(contribution[n-1].pixel-contribution[0].pixel+1)+
(contribution[i].pixel-contribution[0].pixel);
alpha=contribution[i].weight;
- pixel.red+=alpha*GetRedPixelComponent(p+j);
- pixel.green+=alpha*GetGreenPixelComponent(p+j);
- pixel.blue+=alpha*GetBluePixelComponent(p+j);
- pixel.opacity+=alpha*GetOpacityPixelComponent(p+j);
+ pixel.red+=alpha*GetPixelRed(p+j);
+ pixel.green+=alpha*GetPixelGreen(p+j);
+ pixel.blue+=alpha*GetPixelBlue(p+j);
+ pixel.opacity+=alpha*GetPixelOpacity(p+j);
}
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelRed(q,ClampToQuantum(pixel.red));
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
if ((image->colorspace == CMYKColorspace) &&
(resize_image->colorspace == CMYKColorspace))
{
j=y*(contribution[n-1].pixel-contribution[0].pixel+1)+
(contribution[i].pixel-contribution[0].pixel);
alpha=contribution[i].weight;
- pixel.index+=alpha*GetIndexPixelComponent(indexes+j);
+ pixel.index+=alpha*GetPixelIndex(indexes+j);
}
- SetIndexPixelComponent(resize_indexes+y,ClampToQuantum(
+ SetPixelIndex(resize_indexes+y,ClampToQuantum(
pixel.index));
}
}
j=y*(contribution[n-1].pixel-contribution[0].pixel+1)+
(contribution[i].pixel-contribution[0].pixel);
alpha=contribution[i].weight*QuantumScale*
- GetAlphaPixelComponent(p+j);
- pixel.red+=alpha*GetRedPixelComponent(p+j);
- pixel.green+=alpha*GetGreenPixelComponent(p+j);
- pixel.blue+=alpha*GetBluePixelComponent(p+j);
- pixel.opacity+=contribution[i].weight*GetOpacityPixelComponent(p+j);
+ GetPixelAlpha(p+j);
+ pixel.red+=alpha*GetPixelRed(p+j);
+ pixel.green+=alpha*GetPixelGreen(p+j);
+ pixel.blue+=alpha*GetPixelBlue(p+j);
+ pixel.opacity+=contribution[i].weight*GetPixelOpacity(p+j);
gamma+=alpha;
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
- SetRedPixelComponent(q,ClampToQuantum(gamma*pixel.red));
- SetGreenPixelComponent(q,ClampToQuantum(gamma*pixel.green));
- SetBluePixelComponent(q,ClampToQuantum(gamma*pixel.blue));
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelRed(q,ClampToQuantum(gamma*pixel.red));
+ SetPixelGreen(q,ClampToQuantum(gamma*pixel.green));
+ SetPixelBlue(q,ClampToQuantum(gamma*pixel.blue));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
if ((image->colorspace == CMYKColorspace) &&
(resize_image->colorspace == CMYKColorspace))
{
j=y*(contribution[n-1].pixel-contribution[0].pixel+1)+
(contribution[i].pixel-contribution[0].pixel);
alpha=contribution[i].weight*QuantumScale*
- GetAlphaPixelComponent(p+j);
- pixel.index+=alpha*GetIndexPixelComponent(indexes+j);
+ GetPixelAlpha(p+j);
+ pixel.index+=alpha*GetPixelIndex(indexes+j);
}
- SetIndexPixelComponent(resize_indexes+y,ClampToQuantum(gamma*
+ SetPixelIndex(resize_indexes+y,ClampToQuantum(gamma*
pixel.index));
}
}
1.0)+0.5);
j=y*(contribution[n-1].pixel-contribution[0].pixel+1)+
(contribution[i-start].pixel-contribution[0].pixel);
- SetIndexPixelComponent(resize_indexes+y,GetIndexPixelComponent(
+ SetPixelIndex(resize_indexes+y,GetPixelIndex(
indexes+j));
}
q++;
j=(ssize_t) ((contribution[i].pixel-contribution[0].pixel)*
image->columns+x);
alpha=contribution[i].weight;
- pixel.red+=alpha*GetRedPixelComponent(p+j);
- pixel.green+=alpha*GetGreenPixelComponent(p+j);
- pixel.blue+=alpha*GetBluePixelComponent(p+j);
- pixel.opacity+=alpha*GetOpacityPixelComponent(p+j);
+ pixel.red+=alpha*GetPixelRed(p+j);
+ pixel.green+=alpha*GetPixelGreen(p+j);
+ pixel.blue+=alpha*GetPixelBlue(p+j);
+ pixel.opacity+=alpha*GetPixelOpacity(p+j);
}
- SetRedPixelComponent(q,ClampToQuantum(pixel.red));
- SetGreenPixelComponent(q,ClampToQuantum(pixel.green));
- SetBluePixelComponent(q,ClampToQuantum(pixel.blue));
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelRed(q,ClampToQuantum(pixel.red));
+ SetPixelGreen(q,ClampToQuantum(pixel.green));
+ SetPixelBlue(q,ClampToQuantum(pixel.blue));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
if ((image->colorspace == CMYKColorspace) &&
(resize_image->colorspace == CMYKColorspace))
{
j=(ssize_t) ((contribution[i].pixel-contribution[0].pixel)*
image->columns+x);
alpha=contribution[i].weight;
- pixel.index+=alpha*GetIndexPixelComponent(indexes+j);
+ pixel.index+=alpha*GetPixelIndex(indexes+j);
}
- SetIndexPixelComponent(resize_indexes+x,ClampToQuantum(
+ SetPixelIndex(resize_indexes+x,ClampToQuantum(
pixel.index));
}
}
j=(ssize_t) ((contribution[i].pixel-contribution[0].pixel)*
image->columns+x);
alpha=contribution[i].weight*QuantumScale*
- GetAlphaPixelComponent(p+j);
- pixel.red+=alpha*GetRedPixelComponent(p+j);
- pixel.green+=alpha*GetGreenPixelComponent(p+j);
- pixel.blue+=alpha*GetBluePixelComponent(p+j);
- pixel.opacity+=contribution[i].weight*GetOpacityPixelComponent(p+j);
+ GetPixelAlpha(p+j);
+ pixel.red+=alpha*GetPixelRed(p+j);
+ pixel.green+=alpha*GetPixelGreen(p+j);
+ pixel.blue+=alpha*GetPixelBlue(p+j);
+ pixel.opacity+=contribution[i].weight*GetPixelOpacity(p+j);
gamma+=alpha;
}
gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
- SetRedPixelComponent(q,ClampToQuantum(gamma*pixel.red));
- SetGreenPixelComponent(q,ClampToQuantum(gamma*pixel.green));
- SetBluePixelComponent(q,ClampToQuantum(gamma*pixel.blue));
- SetOpacityPixelComponent(q,ClampToQuantum(pixel.opacity));
+ SetPixelRed(q,ClampToQuantum(gamma*pixel.red));
+ SetPixelGreen(q,ClampToQuantum(gamma*pixel.green));
+ SetPixelBlue(q,ClampToQuantum(gamma*pixel.blue));
+ SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
if ((image->colorspace == CMYKColorspace) &&
(resize_image->colorspace == CMYKColorspace))
{
j=(ssize_t) ((contribution[i].pixel-contribution[0].pixel)*
image->columns+x);
alpha=contribution[i].weight*QuantumScale*
- GetAlphaPixelComponent(p+j);
- pixel.index+=alpha*GetIndexPixelComponent(indexes+j);
+ GetPixelAlpha(p+j);
+ pixel.index+=alpha*GetPixelIndex(indexes+j);
}
- SetIndexPixelComponent(resize_indexes+x,ClampToQuantum(gamma*
+ SetPixelIndex(resize_indexes+x,ClampToQuantum(gamma*
pixel.index));
}
}
1.0)+0.5);
j=(ssize_t) ((contribution[i-start].pixel-contribution[0].pixel)*
image->columns+x);
- SetIndexPixelComponent(resize_indexes+x,
- GetIndexPixelComponent(indexes+j));
+ SetPixelIndex(resize_indexes+x,
+ GetPixelIndex(indexes+j));
}
q++;
}
if ((image->storage_class == PseudoClass) ||
(image->colorspace == CMYKColorspace))
for (x=0; x < (ssize_t) sample_image->columns; x++)
- SetIndexPixelComponent(sample_indexes+x,
- GetIndexPixelComponent(indexes+x_offset[x]));
+ SetPixelIndex(sample_indexes+x,
+ GetPixelIndex(indexes+x_offset[x]));
if (SyncCacheViewAuthenticPixels(sample_view,exception) == MagickFalse)
status=MagickFalse;
if (image->progress_monitor != (MagickProgressMonitor) NULL)
for (x=0; x < (ssize_t) image->columns; x++)
{
if (image->matte != MagickFalse)
- alpha=QuantumScale*GetAlphaPixelComponent(p);
- x_vector[x].red=(MagickRealType) (alpha*GetRedPixelComponent(p));
- x_vector[x].green=(MagickRealType) (alpha*GetGreenPixelComponent(p));
- x_vector[x].blue=(MagickRealType) (alpha*GetBluePixelComponent(p));
+ alpha=QuantumScale*GetPixelAlpha(p);
+ x_vector[x].red=(MagickRealType) (alpha*GetPixelRed(p));
+ x_vector[x].green=(MagickRealType) (alpha*GetPixelGreen(p));
+ x_vector[x].blue=(MagickRealType) (alpha*GetPixelBlue(p));
if (image->matte != MagickFalse)
- x_vector[x].opacity=(MagickRealType) GetOpacityPixelComponent(p);
+ x_vector[x].opacity=(MagickRealType) GetPixelOpacity(p);
if (indexes != (IndexPacket *) NULL)
x_vector[x].index=(MagickRealType) (alpha*
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
p++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if (image->matte != MagickFalse)
- alpha=QuantumScale*GetAlphaPixelComponent(p);
+ alpha=QuantumScale*GetPixelAlpha(p);
x_vector[x].red=(MagickRealType) (alpha*
- GetRedPixelComponent(p));
+ GetPixelRed(p));
x_vector[x].green=(MagickRealType) (alpha*
- GetGreenPixelComponent(p));
+ GetPixelGreen(p));
x_vector[x].blue=(MagickRealType) (alpha*
- GetBluePixelComponent(p));
+ GetPixelBlue(p));
if (image->matte != MagickFalse)
x_vector[x].opacity=(MagickRealType)
- GetOpacityPixelComponent(p);
+ GetPixelOpacity(p);
if (indexes != (IndexPacket *) NULL)
x_vector[x].index=(MagickRealType) (alpha*
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
p++;
}
number_rows++;
for (x=0; x < (ssize_t) image->columns; x++)
{
if (image->matte != MagickFalse)
- alpha=QuantumScale*GetAlphaPixelComponent(p);
+ alpha=QuantumScale*GetPixelAlpha(p);
x_vector[x].red=(MagickRealType) (alpha*
- GetRedPixelComponent(p));
+ GetPixelRed(p));
x_vector[x].green=(MagickRealType) (alpha*
- GetGreenPixelComponent(p));
+ GetPixelGreen(p));
x_vector[x].blue=(MagickRealType) (alpha*
- GetBluePixelComponent(p));
+ GetPixelBlue(p));
if (image->matte != MagickFalse)
x_vector[x].opacity=(MagickRealType)
- GetOpacityPixelComponent(p);
+ GetPixelOpacity(p);
if (indexes != (IndexPacket *) NULL)
x_vector[x].index=(MagickRealType) (alpha*
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
p++;
}
number_rows++;
if (scale_image->matte != MagickFalse)
alpha=QuantumScale*(QuantumRange-s->opacity);
alpha=1.0/(fabs(alpha) <= MagickEpsilon ? 1.0 : alpha);
- SetRedPixelComponent(q,ClampToQuantum(alpha*s->red));
- SetGreenPixelComponent(q,ClampToQuantum(alpha*s->green));
- SetBluePixelComponent(q,ClampToQuantum(alpha*s->blue));
+ SetPixelRed(q,ClampToQuantum(alpha*s->red));
+ SetPixelGreen(q,ClampToQuantum(alpha*s->green));
+ SetPixelBlue(q,ClampToQuantum(alpha*s->blue));
if (scale_image->matte != MagickFalse)
- SetOpacityPixelComponent(q,ClampToQuantum(s->opacity));
+ SetPixelOpacity(q,ClampToQuantum(s->opacity));
if (scale_indexes != (IndexPacket *) NULL)
- SetIndexPixelComponent(scale_indexes+x,ClampToQuantum(alpha*
+ SetPixelIndex(scale_indexes+x,ClampToQuantum(alpha*
s->index));
q++;
s++;
if (scale_image->matte != MagickFalse)
alpha=QuantumScale*(QuantumRange-s->opacity);
alpha=1.0/(fabs(alpha) <= MagickEpsilon ? 1.0 : alpha);
- SetRedPixelComponent(q,ClampToQuantum(alpha*t->red));
- SetGreenPixelComponent(q,ClampToQuantum(alpha*t->green));
- SetBluePixelComponent(q,ClampToQuantum(alpha*t->blue));
+ SetPixelRed(q,ClampToQuantum(alpha*t->red));
+ SetPixelGreen(q,ClampToQuantum(alpha*t->green));
+ SetPixelBlue(q,ClampToQuantum(alpha*t->blue));
if (scale_image->matte != MagickFalse)
- SetOpacityPixelComponent(q,ClampToQuantum(t->opacity));
+ SetPixelOpacity(q,ClampToQuantum(t->opacity));
if (scale_indexes != (IndexPacket *) NULL)
- SetIndexPixelComponent(scale_indexes+x,ClampToQuantum(alpha*
+ SetPixelIndex(scale_indexes+x,ClampToQuantum(alpha*
t->index));
t++;
q++;
for (x=0; x < (ssize_t) image->columns; x++)
{
for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
- if (((ssize_t) ScaleQuantumToChar(GetRedPixelComponent(p)) >=
+ if (((ssize_t) ScaleQuantumToChar(GetPixelRed(p)) >=
(cluster->red.left-SafeMargin)) &&
- ((ssize_t) ScaleQuantumToChar(GetRedPixelComponent(p)) <=
+ ((ssize_t) ScaleQuantumToChar(GetPixelRed(p)) <=
(cluster->red.right+SafeMargin)) &&
- ((ssize_t) ScaleQuantumToChar(GetGreenPixelComponent(p)) >=
+ ((ssize_t) ScaleQuantumToChar(GetPixelGreen(p)) >=
(cluster->green.left-SafeMargin)) &&
- ((ssize_t) ScaleQuantumToChar(GetGreenPixelComponent(p)) <=
+ ((ssize_t) ScaleQuantumToChar(GetPixelGreen(p)) <=
(cluster->green.right+SafeMargin)) &&
- ((ssize_t) ScaleQuantumToChar(GetBluePixelComponent(p)) >=
+ ((ssize_t) ScaleQuantumToChar(GetPixelBlue(p)) >=
(cluster->blue.left-SafeMargin)) &&
- ((ssize_t) ScaleQuantumToChar(GetBluePixelComponent(p)) <=
+ ((ssize_t) ScaleQuantumToChar(GetPixelBlue(p)) <=
(cluster->blue.right+SafeMargin)))
{
/*
Count this pixel.
*/
count++;
- cluster->red.center+=(MagickRealType) ScaleQuantumToChar(GetRedPixelComponent(p));
+ cluster->red.center+=(MagickRealType) ScaleQuantumToChar(GetPixelRed(p));
cluster->green.center+=(MagickRealType)
- ScaleQuantumToChar(GetGreenPixelComponent(p));
- cluster->blue.center+=(MagickRealType) ScaleQuantumToChar(GetBluePixelComponent(p));
+ ScaleQuantumToChar(GetPixelGreen(p));
+ cluster->blue.center+=(MagickRealType) ScaleQuantumToChar(GetPixelBlue(p));
cluster->count++;
break;
}
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetIndexPixelComponent(indexes+x,0);
+ SetPixelIndex(indexes+x,0);
for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
{
if (((ssize_t) ScaleQuantumToChar(q->red) >=
/*
Classify this pixel.
*/
- SetIndexPixelComponent(indexes+x,cluster->id);
+ SetPixelIndex(indexes+x,cluster->id);
break;
}
}
sum=0.0;
p=image->colormap+j;
distance_squared=squares[(ssize_t) ScaleQuantumToChar(q->red)-
- (ssize_t) ScaleQuantumToChar(GetRedPixelComponent(p))]+
+ (ssize_t) ScaleQuantumToChar(GetPixelRed(p))]+
squares[(ssize_t) ScaleQuantumToChar(q->green)-
- (ssize_t) ScaleQuantumToChar(GetGreenPixelComponent(p))]+
+ (ssize_t) ScaleQuantumToChar(GetPixelGreen(p))]+
squares[(ssize_t) ScaleQuantumToChar(q->blue)-
- (ssize_t) ScaleQuantumToChar(GetBluePixelComponent(p))];
+ (ssize_t) ScaleQuantumToChar(GetPixelBlue(p))];
numerator=distance_squared;
for (k=0; k < (ssize_t) image->colors; k++)
{
p=image->colormap+k;
distance_squared=squares[(ssize_t) ScaleQuantumToChar(q->red)-
- (ssize_t) ScaleQuantumToChar(GetRedPixelComponent(p))]+
+ (ssize_t) ScaleQuantumToChar(GetPixelRed(p))]+
squares[(ssize_t) ScaleQuantumToChar(q->green)-
- (ssize_t) ScaleQuantumToChar(GetGreenPixelComponent(p))]+
+ (ssize_t) ScaleQuantumToChar(GetPixelGreen(p))]+
squares[(ssize_t) ScaleQuantumToChar(q->blue)-
- (ssize_t) ScaleQuantumToChar(GetBluePixelComponent(p))];
+ (ssize_t) ScaleQuantumToChar(GetPixelBlue(p))];
ratio=numerator/distance_squared;
sum+=SegmentPower(ratio);
}
Classify this pixel.
*/
local_minima=1.0/sum;
- SetIndexPixelComponent(indexes+x,j);
+ SetPixelIndex(indexes+x,j);
}
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
- if (((ssize_t) ScaleQuantumToChar(GetRedPixelComponent(p)) >=
+ if (((ssize_t) ScaleQuantumToChar(GetPixelRed(p)) >=
(cluster->red.left-SafeMargin)) &&
- ((ssize_t) ScaleQuantumToChar(GetRedPixelComponent(p)) <=
+ ((ssize_t) ScaleQuantumToChar(GetPixelRed(p)) <=
(cluster->red.right+SafeMargin)) &&
- ((ssize_t) ScaleQuantumToChar(GetGreenPixelComponent(p)) >=
+ ((ssize_t) ScaleQuantumToChar(GetPixelGreen(p)) >=
(cluster->green.left-SafeMargin)) &&
- ((ssize_t) ScaleQuantumToChar(GetGreenPixelComponent(p)) <=
+ ((ssize_t) ScaleQuantumToChar(GetPixelGreen(p)) <=
(cluster->green.right+SafeMargin)) &&
- ((ssize_t) ScaleQuantumToChar(GetBluePixelComponent(p)) >=
+ ((ssize_t) ScaleQuantumToChar(GetPixelBlue(p)) >=
(cluster->blue.left-SafeMargin)) &&
- ((ssize_t) ScaleQuantumToChar(GetBluePixelComponent(p)) <=
+ ((ssize_t) ScaleQuantumToChar(GetPixelBlue(p)) <=
(cluster->blue.right+SafeMargin)))
{
/*
*/
count++;
cluster->red.center+=(MagickRealType)
- ScaleQuantumToChar(GetRedPixelComponent(p));
+ ScaleQuantumToChar(GetPixelRed(p));
cluster->green.center+=(MagickRealType)
- ScaleQuantumToChar(GetGreenPixelComponent(p));
+ ScaleQuantumToChar(GetPixelGreen(p));
cluster->blue.center+=(MagickRealType)
- ScaleQuantumToChar(GetBluePixelComponent(p));
+ ScaleQuantumToChar(GetPixelBlue(p));
cluster->count++;
break;
}
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- histogram[Red][(ssize_t) ScaleQuantumToChar(GetRedPixelComponent(p))]++;
- histogram[Green][(ssize_t) ScaleQuantumToChar(GetGreenPixelComponent(p))]++;
- histogram[Blue][(ssize_t) ScaleQuantumToChar(GetBluePixelComponent(p))]++;
+ histogram[Red][(ssize_t) ScaleQuantumToChar(GetPixelRed(p))]++;
+ histogram[Green][(ssize_t) ScaleQuantumToChar(GetPixelGreen(p))]++;
+ histogram[Blue][(ssize_t) ScaleQuantumToChar(GetPixelBlue(p))]++;
p++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
byte<<=1;
- if (((MagickRealType) GetRedPixelComponent(p) < threshold) ||
- ((MagickRealType) GetGreenPixelComponent(p) < threshold) ||
- ((MagickRealType) GetBluePixelComponent(p) < threshold))
+ if (((MagickRealType) GetPixelRed(p) < threshold) ||
+ ((MagickRealType) GetPixelGreen(p) < threshold) ||
+ ((MagickRealType) GetPixelBlue(p) < threshold))
byte|=0x01;
bit++;
if (bit == 8)
for (x=0; x < (ssize_t) image->columns; x++)
{
byte<<=1;
- if (((MagickRealType) GetRedPixelComponent(p) < threshold) ||
- ((MagickRealType) GetGreenPixelComponent(p) < threshold) ||
- ((MagickRealType) GetBluePixelComponent(p) < threshold))
+ if (((MagickRealType) GetPixelRed(p) < threshold) ||
+ ((MagickRealType) GetPixelGreen(p) < threshold) ||
+ ((MagickRealType) GetPixelBlue(p) < threshold))
byte|=0x01;
bit++;
if (bit == 8)
{
if ((x >= offset) && (x < ((ssize_t) image->columns-offset)))
continue;
- background.red+=QuantumScale*GetRedPixelComponent(p);
- background.green+=QuantumScale*GetGreenPixelComponent(p);
- background.blue+=QuantumScale*GetBluePixelComponent(p);
- background.opacity+=QuantumScale*GetOpacityPixelComponent(p);
+ background.red+=QuantumScale*GetPixelRed(p);
+ background.green+=QuantumScale*GetPixelGreen(p);
+ background.blue+=QuantumScale*GetPixelBlue(p);
+ background.opacity+=QuantumScale*GetPixelOpacity(p);
count++;
p++;
}
if ((indexes != (IndexPacket *) NULL) &&
(rotate_indexes != (IndexPacket *) NULL))
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(rotate_indexes+image->columns-x-1,
- GetIndexPixelComponent(indexes+x));
+ SetPixelIndex(rotate_indexes+image->columns-x-1,
+ GetPixelIndex(indexes+x));
sync=SyncCacheViewAuthenticPixels(rotate_view,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
SetMagickPixelPacket(image,p,indexes,&source);
MagickPixelCompositeAreaBlend(&pixel,(MagickRealType) pixel.opacity,
- &source,(MagickRealType) GetOpacityPixelComponent(p),area,&destination);
+ &source,(MagickRealType) GetPixelOpacity(p),area,&destination);
SetPixelPacket(image,&destination,q++,shear_indexes++);
SetMagickPixelPacket(image,p++,indexes++,&pixel);
}
continue;
SetMagickPixelPacket(image,p,indexes,&source);
MagickPixelCompositeAreaBlend(&pixel,(MagickRealType) pixel.opacity,
- &source,(MagickRealType) GetOpacityPixelComponent(p),area,&destination);
+ &source,(MagickRealType) GetPixelOpacity(p),area,&destination);
SetPixelPacket(image,&destination,q,shear_indexes);
SetMagickPixelPacket(image,p,indexes,&pixel);
}
}
SetMagickPixelPacket(image,p,indexes,&source);
MagickPixelCompositeAreaBlend(&pixel,(MagickRealType) pixel.opacity,
- &source,(MagickRealType) GetOpacityPixelComponent(p),area,&destination);
+ &source,(MagickRealType) GetPixelOpacity(p),area,&destination);
SetPixelPacket(image,&destination,q++,shear_indexes++);
SetMagickPixelPacket(image,p++,indexes++,&pixel);
}
continue;
SetMagickPixelPacket(image,p,indexes,&source);
MagickPixelCompositeAreaBlend(&pixel,(MagickRealType) pixel.opacity,
- &source,(MagickRealType) GetOpacityPixelComponent(p),area,&destination);
+ &source,(MagickRealType) GetPixelOpacity(p),area,&destination);
SetPixelPacket(image,&destination,q,shear_indexes);
SetMagickPixelPacket(image,p,indexes,&pixel);
}
}
indexes=GetCacheViewVirtualIndexQueue(image_view);
evaluate_pixel[i].red=ApplyEvaluateOperator(random_info[id],
- GetRedPixelComponent(p),op,evaluate_pixel[i].red);
+ GetPixelRed(p),op,evaluate_pixel[i].red);
evaluate_pixel[i].green=ApplyEvaluateOperator(random_info[id],
- GetGreenPixelComponent(p),op,evaluate_pixel[i].green);
+ GetPixelGreen(p),op,evaluate_pixel[i].green);
evaluate_pixel[i].blue=ApplyEvaluateOperator(random_info[id],
- GetBluePixelComponent(p),op,evaluate_pixel[i].blue);
+ GetPixelBlue(p),op,evaluate_pixel[i].blue);
evaluate_pixel[i].opacity=ApplyEvaluateOperator(random_info[id],
- GetOpacityPixelComponent(p),op,evaluate_pixel[i].opacity);
+ GetPixelOpacity(p),op,evaluate_pixel[i].opacity);
if (evaluate_image->colorspace == CMYKColorspace)
evaluate_pixel[i].index=ApplyEvaluateOperator(random_info[id],
*indexes,op,evaluate_pixel[i].index);
}
qsort((void *) evaluate_pixel,number_images,sizeof(*evaluate_pixel),
IntensityCompare);
- SetRedPixelComponent(q,ClampToQuantum(evaluate_pixel[i/2].red));
- SetGreenPixelComponent(q,ClampToQuantum(evaluate_pixel[i/2].green));
- SetBluePixelComponent(q,ClampToQuantum(evaluate_pixel[i/2].blue));
+ SetPixelRed(q,ClampToQuantum(evaluate_pixel[i/2].red));
+ SetPixelGreen(q,ClampToQuantum(evaluate_pixel[i/2].green));
+ SetPixelBlue(q,ClampToQuantum(evaluate_pixel[i/2].blue));
if (evaluate_image->matte == MagickFalse)
- SetOpacityPixelComponent(q,ClampToQuantum(
+ SetPixelOpacity(q,ClampToQuantum(
evaluate_pixel[i/2].opacity));
else
- SetAlphaPixelComponent(q,ClampToQuantum(evaluate_pixel[i/2].opacity));
+ SetPixelAlpha(q,ClampToQuantum(evaluate_pixel[i/2].opacity));
if (evaluate_image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(evaluate_indexes+i,ClampToQuantum(
+ SetPixelIndex(evaluate_indexes+i,ClampToQuantum(
evaluate_pixel[i/2].index));
q++;
}
for (x=0; x < (ssize_t) next->columns; x++)
{
evaluate_pixel[x].red=ApplyEvaluateOperator(random_info[id],
- GetRedPixelComponent(p),i == 0 ? AddEvaluateOperator : op,evaluate_pixel[x].red);
+ GetPixelRed(p),i == 0 ? AddEvaluateOperator : op,evaluate_pixel[x].red);
evaluate_pixel[x].green=ApplyEvaluateOperator(random_info[id],
- GetGreenPixelComponent(p),i == 0 ? AddEvaluateOperator : op,
+ GetPixelGreen(p),i == 0 ? AddEvaluateOperator : op,
evaluate_pixel[x].green);
evaluate_pixel[x].blue=ApplyEvaluateOperator(random_info[id],
- GetBluePixelComponent(p),i == 0 ? AddEvaluateOperator : op,
+ GetPixelBlue(p),i == 0 ? AddEvaluateOperator : op,
evaluate_pixel[x].blue);
evaluate_pixel[x].opacity=ApplyEvaluateOperator(random_info[id],
- GetOpacityPixelComponent(p),i == 0 ? AddEvaluateOperator : op,
+ GetPixelOpacity(p),i == 0 ? AddEvaluateOperator : op,
evaluate_pixel[x].opacity);
if (evaluate_image->colorspace == CMYKColorspace)
evaluate_pixel[x].index=ApplyEvaluateOperator(random_info[id],
- GetIndexPixelComponent(indexes+x),i == 0 ? AddEvaluateOperator :
+ GetPixelIndex(indexes+x),i == 0 ? AddEvaluateOperator :
op,evaluate_pixel[x].index);
p++;
}
}
for (x=0; x < (ssize_t) evaluate_image->columns; x++)
{
- SetRedPixelComponent(q,ClampToQuantum(evaluate_pixel[x].red));
- SetGreenPixelComponent(q,ClampToQuantum(evaluate_pixel[x].green));
- SetBluePixelComponent(q,ClampToQuantum(evaluate_pixel[x].blue));
+ SetPixelRed(q,ClampToQuantum(evaluate_pixel[x].red));
+ SetPixelGreen(q,ClampToQuantum(evaluate_pixel[x].green));
+ SetPixelBlue(q,ClampToQuantum(evaluate_pixel[x].blue));
if (evaluate_image->matte == MagickFalse)
- SetOpacityPixelComponent(q,ClampToQuantum(evaluate_pixel[x].opacity));
+ SetPixelOpacity(q,ClampToQuantum(evaluate_pixel[x].opacity));
else
- SetAlphaPixelComponent(q,ClampToQuantum(evaluate_pixel[x].opacity));
+ SetPixelAlpha(q,ClampToQuantum(evaluate_pixel[x].opacity));
if (evaluate_image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(evaluate_indexes+x,ClampToQuantum(
+ SetPixelIndex(evaluate_indexes+x,ClampToQuantum(
evaluate_pixel[x].index));
q++;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToQuantum(ApplyEvaluateOperator(
- random_info[id],GetRedPixelComponent(q),op,value)));
+ SetPixelRed(q,ClampToQuantum(ApplyEvaluateOperator(
+ random_info[id],GetPixelRed(q),op,value)));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToQuantum(ApplyEvaluateOperator(
- random_info[id],GetGreenPixelComponent(q),op,value)));
+ SetPixelGreen(q,ClampToQuantum(ApplyEvaluateOperator(
+ random_info[id],GetPixelGreen(q),op,value)));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToQuantum(ApplyEvaluateOperator(
- random_info[id],GetBluePixelComponent(q),op,value)));
+ SetPixelBlue(q,ClampToQuantum(ApplyEvaluateOperator(
+ random_info[id],GetPixelBlue(q),op,value)));
if ((channel & OpacityChannel) != 0)
{
if (image->matte == MagickFalse)
- SetOpacityPixelComponent(q,ClampToQuantum(ApplyEvaluateOperator(
- random_info[id],GetOpacityPixelComponent(q),op,value)));
+ SetPixelOpacity(q,ClampToQuantum(ApplyEvaluateOperator(
+ random_info[id],GetPixelOpacity(q),op,value)));
else
- SetAlphaPixelComponent(q,ClampToQuantum(ApplyEvaluateOperator(
- random_info[id],(Quantum) GetAlphaPixelComponent(q),op,value)));
+ SetPixelAlpha(q,ClampToQuantum(ApplyEvaluateOperator(
+ random_info[id],(Quantum) GetPixelAlpha(q),op,value)));
}
if (((channel & IndexChannel) != 0) && (indexes != (IndexPacket *) NULL))
- SetIndexPixelComponent(indexes+x,ClampToQuantum(ApplyEvaluateOperator(
- random_info[id],GetIndexPixelComponent(indexes+x),op,value)));
+ SetPixelIndex(indexes+x,ClampToQuantum(ApplyEvaluateOperator(
+ random_info[id],GetPixelIndex(indexes+x),op,value)));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ApplyFunction(GetRedPixelComponent(q),
+ SetPixelRed(q,ApplyFunction(GetPixelRed(q),
function,number_parameters,parameters,exception));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ApplyFunction(GetGreenPixelComponent(q),
+ SetPixelGreen(q,ApplyFunction(GetPixelGreen(q),
function,number_parameters,parameters,exception));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ApplyFunction(GetBluePixelComponent(q),
+ SetPixelBlue(q,ApplyFunction(GetPixelBlue(q),
function,number_parameters,parameters,exception));
if ((channel & OpacityChannel) != 0)
{
if (image->matte == MagickFalse)
- SetOpacityPixelComponent(q,ApplyFunction(
- GetOpacityPixelComponent(q),function,number_parameters,parameters,
+ SetPixelOpacity(q,ApplyFunction(
+ GetPixelOpacity(q),function,number_parameters,parameters,
exception));
else
- SetAlphaPixelComponent(q,ApplyFunction((Quantum)
- GetAlphaPixelComponent(q),function,number_parameters,parameters,
+ SetPixelAlpha(q,ApplyFunction((Quantum)
+ GetPixelAlpha(q),function,number_parameters,parameters,
exception));
}
if (((channel & IndexChannel) != 0) && (indexes != (IndexPacket *) NULL))
- SetIndexPixelComponent(indexes+x,ApplyFunction(GetIndexPixelComponent(
+ SetPixelIndex(indexes+x,ApplyFunction(GetPixelIndex(
indexes+x),function,number_parameters,parameters,exception));
q++;
}
{
if ((channel & RedChannel) != 0)
{
- mean+=GetRedPixelComponent(p);
- sum_squares+=(double) GetRedPixelComponent(p)*GetRedPixelComponent(p);
- sum_cubes+=(double) GetRedPixelComponent(p)*GetRedPixelComponent(p)*
- GetRedPixelComponent(p);
- sum_fourth_power+=(double) GetRedPixelComponent(p)*
- GetRedPixelComponent(p)*GetRedPixelComponent(p)*
- GetRedPixelComponent(p);
+ mean+=GetPixelRed(p);
+ sum_squares+=(double) GetPixelRed(p)*GetPixelRed(p);
+ sum_cubes+=(double) GetPixelRed(p)*GetPixelRed(p)*
+ GetPixelRed(p);
+ sum_fourth_power+=(double) GetPixelRed(p)*
+ GetPixelRed(p)*GetPixelRed(p)*
+ GetPixelRed(p);
area++;
}
if ((channel & GreenChannel) != 0)
{
- mean+=GetGreenPixelComponent(p);
- sum_squares+=(double) GetGreenPixelComponent(p)*
- GetGreenPixelComponent(p);
- sum_cubes+=(double) GetGreenPixelComponent(p)*
- GetGreenPixelComponent(p)*GetGreenPixelComponent(p);
- sum_fourth_power+=(double) GetGreenPixelComponent(p)*
- GetGreenPixelComponent(p)*GetGreenPixelComponent(p)*
- GetGreenPixelComponent(p);
+ mean+=GetPixelGreen(p);
+ sum_squares+=(double) GetPixelGreen(p)*
+ GetPixelGreen(p);
+ sum_cubes+=(double) GetPixelGreen(p)*
+ GetPixelGreen(p)*GetPixelGreen(p);
+ sum_fourth_power+=(double) GetPixelGreen(p)*
+ GetPixelGreen(p)*GetPixelGreen(p)*
+ GetPixelGreen(p);
area++;
}
if ((channel & BlueChannel) != 0)
{
- mean+=GetBluePixelComponent(p);
- sum_squares+=(double) GetBluePixelComponent(p)*
- GetBluePixelComponent(p);
- sum_cubes+=(double) GetBluePixelComponent(p)*GetBluePixelComponent(p)*
- GetBluePixelComponent(p);
- sum_fourth_power+=(double) GetBluePixelComponent(p)*
- GetBluePixelComponent(p)*GetBluePixelComponent(p)*
- GetBluePixelComponent(p);
+ mean+=GetPixelBlue(p);
+ sum_squares+=(double) GetPixelBlue(p)*
+ GetPixelBlue(p);
+ sum_cubes+=(double) GetPixelBlue(p)*GetPixelBlue(p)*
+ GetPixelBlue(p);
+ sum_fourth_power+=(double) GetPixelBlue(p)*
+ GetPixelBlue(p)*GetPixelBlue(p)*
+ GetPixelBlue(p);
area++;
}
if ((channel & OpacityChannel) != 0)
{
- mean+=GetOpacityPixelComponent(p);
- sum_squares+=(double) GetOpacityPixelComponent(p)*
- GetOpacityPixelComponent(p);
- sum_cubes+=(double) GetOpacityPixelComponent(p)*
- GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p);
- sum_fourth_power+=(double) GetOpacityPixelComponent(p)*
- GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p)*
- GetOpacityPixelComponent(p);
+ mean+=GetPixelOpacity(p);
+ sum_squares+=(double) GetPixelOpacity(p)*
+ GetPixelOpacity(p);
+ sum_cubes+=(double) GetPixelOpacity(p)*
+ GetPixelOpacity(p)*GetPixelOpacity(p);
+ sum_fourth_power+=(double) GetPixelOpacity(p)*
+ GetPixelOpacity(p)*GetPixelOpacity(p)*
+ GetPixelOpacity(p);
area++;
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
{
- mean+=GetIndexPixelComponent(indexes+x);
- sum_squares+=(double) GetIndexPixelComponent(indexes+x)*
- GetIndexPixelComponent(indexes+x);
- sum_cubes+=(double) GetIndexPixelComponent(indexes+x)*
- GetIndexPixelComponent(indexes+x)*GetIndexPixelComponent(indexes+x);
- sum_fourth_power+=(double) GetIndexPixelComponent(indexes+x)*
- GetIndexPixelComponent(indexes+x)*GetIndexPixelComponent(indexes+x)*
- GetIndexPixelComponent(indexes+x);
+ mean+=GetPixelIndex(indexes+x);
+ sum_squares+=(double) GetPixelIndex(indexes+x)*
+ GetPixelIndex(indexes+x);
+ sum_cubes+=(double) GetPixelIndex(indexes+x)*
+ GetPixelIndex(indexes+x)*GetPixelIndex(indexes+x);
+ sum_fourth_power+=(double) GetPixelIndex(indexes+x)*
+ GetPixelIndex(indexes+x)*GetPixelIndex(indexes+x)*
+ GetPixelIndex(indexes+x);
area++;
}
p++;
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
{
- if ((double) GetIndexPixelComponent(indexes+x) < *minima)
- *minima=(double) GetIndexPixelComponent(indexes+x);
- if ((double) GetIndexPixelComponent(indexes+x) > *maxima)
- *maxima=(double) GetIndexPixelComponent(indexes+x);
+ if ((double) GetPixelIndex(indexes+x) < *minima)
+ *minima=(double) GetPixelIndex(indexes+x);
+ if ((double) GetPixelIndex(indexes+x) > *maxima)
+ *maxima=(double) GetPixelIndex(indexes+x);
}
p++;
}
{
depth=channel_statistics[RedChannel].depth;
range=GetQuantumRange(depth);
- status=GetRedPixelComponent(p) != ScaleAnyToQuantum(
- ScaleQuantumToAny(GetRedPixelComponent(p),range),range) ?
+ status=GetPixelRed(p) != ScaleAnyToQuantum(
+ ScaleQuantumToAny(GetPixelRed(p),range),range) ?
MagickTrue : MagickFalse;
if (status != MagickFalse)
{
{
depth=channel_statistics[GreenChannel].depth;
range=GetQuantumRange(depth);
- status=GetGreenPixelComponent(p) != ScaleAnyToQuantum(
- ScaleQuantumToAny(GetGreenPixelComponent(p),range),range) ?
+ status=GetPixelGreen(p) != ScaleAnyToQuantum(
+ ScaleQuantumToAny(GetPixelGreen(p),range),range) ?
MagickTrue : MagickFalse;
if (status != MagickFalse)
{
{
depth=channel_statistics[BlueChannel].depth;
range=GetQuantumRange(depth);
- status=GetBluePixelComponent(p) != ScaleAnyToQuantum(
- ScaleQuantumToAny(GetBluePixelComponent(p),range),range) ?
+ status=GetPixelBlue(p) != ScaleAnyToQuantum(
+ ScaleQuantumToAny(GetPixelBlue(p),range),range) ?
MagickTrue : MagickFalse;
if (status != MagickFalse)
{
{
depth=channel_statistics[OpacityChannel].depth;
range=GetQuantumRange(depth);
- status=GetOpacityPixelComponent(p) != ScaleAnyToQuantum(
- ScaleQuantumToAny(GetOpacityPixelComponent(p),range),range) ?
+ status=GetPixelOpacity(p) != ScaleAnyToQuantum(
+ ScaleQuantumToAny(GetPixelOpacity(p),range),range) ?
MagickTrue : MagickFalse;
if (status != MagickFalse)
{
{
depth=channel_statistics[BlackChannel].depth;
range=GetQuantumRange(depth);
- status=GetIndexPixelComponent(indexes+x) !=
- ScaleAnyToQuantum(ScaleQuantumToAny(GetIndexPixelComponent(
+ status=GetPixelIndex(indexes+x) !=
+ ScaleAnyToQuantum(ScaleQuantumToAny(GetPixelIndex(
indexes+x),range),range) ? MagickTrue : MagickFalse;
if (status != MagickFalse)
{
}
}
}
- if ((double) GetRedPixelComponent(p) < channel_statistics[RedChannel].minima)
- channel_statistics[RedChannel].minima=(double) GetRedPixelComponent(p);
- if ((double) GetRedPixelComponent(p) > channel_statistics[RedChannel].maxima)
- channel_statistics[RedChannel].maxima=(double) GetRedPixelComponent(p);
- channel_statistics[RedChannel].sum+=GetRedPixelComponent(p);
- channel_statistics[RedChannel].sum_squared+=(double) GetRedPixelComponent(p)*
- GetRedPixelComponent(p);
+ if ((double) GetPixelRed(p) < channel_statistics[RedChannel].minima)
+ channel_statistics[RedChannel].minima=(double) GetPixelRed(p);
+ if ((double) GetPixelRed(p) > channel_statistics[RedChannel].maxima)
+ channel_statistics[RedChannel].maxima=(double) GetPixelRed(p);
+ channel_statistics[RedChannel].sum+=GetPixelRed(p);
+ channel_statistics[RedChannel].sum_squared+=(double) GetPixelRed(p)*
+ GetPixelRed(p);
channel_statistics[RedChannel].sum_cubed+=(double)
- GetRedPixelComponent(p)*GetRedPixelComponent(p)*
- GetRedPixelComponent(p);
+ GetPixelRed(p)*GetPixelRed(p)*
+ GetPixelRed(p);
channel_statistics[RedChannel].sum_fourth_power+=(double)
- GetRedPixelComponent(p)*GetRedPixelComponent(p)*
- GetRedPixelComponent(p)*GetRedPixelComponent(p);
- if ((double) GetGreenPixelComponent(p) < channel_statistics[GreenChannel].minima)
+ GetPixelRed(p)*GetPixelRed(p)*
+ GetPixelRed(p)*GetPixelRed(p);
+ if ((double) GetPixelGreen(p) < channel_statistics[GreenChannel].minima)
channel_statistics[GreenChannel].minima=(double)
- GetGreenPixelComponent(p);
- if ((double) GetGreenPixelComponent(p) > channel_statistics[GreenChannel].maxima)
+ GetPixelGreen(p);
+ if ((double) GetPixelGreen(p) > channel_statistics[GreenChannel].maxima)
channel_statistics[GreenChannel].maxima=(double)
- GetGreenPixelComponent(p);
- channel_statistics[GreenChannel].sum+=GetGreenPixelComponent(p);
+ GetPixelGreen(p);
+ channel_statistics[GreenChannel].sum+=GetPixelGreen(p);
channel_statistics[GreenChannel].sum_squared+=(double)
- GetGreenPixelComponent(p)*GetGreenPixelComponent(p);
+ GetPixelGreen(p)*GetPixelGreen(p);
channel_statistics[GreenChannel].sum_cubed+=(double)
- GetGreenPixelComponent(p)*GetGreenPixelComponent(p)*
- GetGreenPixelComponent(p);
+ GetPixelGreen(p)*GetPixelGreen(p)*
+ GetPixelGreen(p);
channel_statistics[GreenChannel].sum_fourth_power+=(double)
- GetGreenPixelComponent(p)*GetGreenPixelComponent(p)*
- GetGreenPixelComponent(p)*GetGreenPixelComponent(p);
- if ((double) GetBluePixelComponent(p) < channel_statistics[BlueChannel].minima)
+ GetPixelGreen(p)*GetPixelGreen(p)*
+ GetPixelGreen(p)*GetPixelGreen(p);
+ if ((double) GetPixelBlue(p) < channel_statistics[BlueChannel].minima)
channel_statistics[BlueChannel].minima=(double)
- GetBluePixelComponent(p);
- if ((double) GetBluePixelComponent(p) > channel_statistics[BlueChannel].maxima)
+ GetPixelBlue(p);
+ if ((double) GetPixelBlue(p) > channel_statistics[BlueChannel].maxima)
channel_statistics[BlueChannel].maxima=(double)
- GetBluePixelComponent(p);
- channel_statistics[BlueChannel].sum+=GetBluePixelComponent(p);
+ GetPixelBlue(p);
+ channel_statistics[BlueChannel].sum+=GetPixelBlue(p);
channel_statistics[BlueChannel].sum_squared+=(double)
- GetBluePixelComponent(p)*GetBluePixelComponent(p);
+ GetPixelBlue(p)*GetPixelBlue(p);
channel_statistics[BlueChannel].sum_cubed+=(double)
- GetBluePixelComponent(p)*GetBluePixelComponent(p)*
- GetBluePixelComponent(p);
+ GetPixelBlue(p)*GetPixelBlue(p)*
+ GetPixelBlue(p);
channel_statistics[BlueChannel].sum_fourth_power+=(double)
- GetBluePixelComponent(p)*GetBluePixelComponent(p)*
- GetBluePixelComponent(p)*GetBluePixelComponent(p);
+ GetPixelBlue(p)*GetPixelBlue(p)*
+ GetPixelBlue(p)*GetPixelBlue(p);
if (image->matte != MagickFalse)
{
- if ((double) GetOpacityPixelComponent(p) < channel_statistics[OpacityChannel].minima)
+ if ((double) GetPixelOpacity(p) < channel_statistics[OpacityChannel].minima)
channel_statistics[OpacityChannel].minima=(double)
- GetOpacityPixelComponent(p);
- if ((double) GetOpacityPixelComponent(p) > channel_statistics[OpacityChannel].maxima)
+ GetPixelOpacity(p);
+ if ((double) GetPixelOpacity(p) > channel_statistics[OpacityChannel].maxima)
channel_statistics[OpacityChannel].maxima=(double)
- GetOpacityPixelComponent(p);
- channel_statistics[OpacityChannel].sum+=GetOpacityPixelComponent(p);
+ GetPixelOpacity(p);
+ channel_statistics[OpacityChannel].sum+=GetPixelOpacity(p);
channel_statistics[OpacityChannel].sum_squared+=(double)
- GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p);
+ GetPixelOpacity(p)*GetPixelOpacity(p);
channel_statistics[OpacityChannel].sum_cubed+=(double)
- GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p)*
- GetOpacityPixelComponent(p);
+ GetPixelOpacity(p)*GetPixelOpacity(p)*
+ GetPixelOpacity(p);
channel_statistics[OpacityChannel].sum_fourth_power+=(double)
- GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p)*
- GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p);
+ GetPixelOpacity(p)*GetPixelOpacity(p)*
+ GetPixelOpacity(p)*GetPixelOpacity(p);
}
if (image->colorspace == CMYKColorspace)
{
- if ((double) GetIndexPixelComponent(indexes+x) < channel_statistics[BlackChannel].minima)
+ if ((double) GetPixelIndex(indexes+x) < channel_statistics[BlackChannel].minima)
channel_statistics[BlackChannel].minima=(double)
- GetIndexPixelComponent(indexes+x);
- if ((double) GetIndexPixelComponent(indexes+x) > channel_statistics[BlackChannel].maxima)
+ GetPixelIndex(indexes+x);
+ if ((double) GetPixelIndex(indexes+x) > channel_statistics[BlackChannel].maxima)
channel_statistics[BlackChannel].maxima=(double)
- GetIndexPixelComponent(indexes+x);
+ GetPixelIndex(indexes+x);
channel_statistics[BlackChannel].sum+=
- GetIndexPixelComponent(indexes+x);
+ GetPixelIndex(indexes+x);
channel_statistics[BlackChannel].sum_squared+=(double)
- GetIndexPixelComponent(indexes+x)*GetIndexPixelComponent(indexes+x);
+ GetPixelIndex(indexes+x)*GetPixelIndex(indexes+x);
channel_statistics[BlackChannel].sum_cubed+=(double)
- GetIndexPixelComponent(indexes+x)*GetIndexPixelComponent(indexes+x)*
- GetIndexPixelComponent(indexes+x);
+ GetPixelIndex(indexes+x)*GetPixelIndex(indexes+x)*
+ GetPixelIndex(indexes+x);
channel_statistics[BlackChannel].sum_fourth_power+=(double)
- GetIndexPixelComponent(indexes+x)*GetIndexPixelComponent(indexes+x)*
- GetIndexPixelComponent(indexes+x)*GetIndexPixelComponent(indexes+x);
+ GetPixelIndex(indexes+x)*GetPixelIndex(indexes+x)*
+ GetPixelIndex(indexes+x)*GetPixelIndex(indexes+x);
}
x++;
p++;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar((Quantum) (GetPixelAlpha(p)));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
*q++=ScaleQuantumToChar((Quantum) 0);
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
+ *q++=ScaleQuantumToChar((Quantum) (GetPixelAlpha(p)));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
*q++=ScaleQuantumToChar((Quantum) 0);
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q=ScaleQuantumToChar(GetPixelRed(p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=ScaleQuantumToChar(GetGreenPixelComponent(p));
+ *q=ScaleQuantumToChar(GetPixelGreen(p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q=ScaleQuantumToChar(GetPixelBlue(p));
break;
}
case AlphaQuantum:
{
- *q=ScaleQuantumToChar((Quantum) (GetAlphaPixelComponent(p)));
+ *q=ScaleQuantumToChar((Quantum) (GetPixelAlpha(p)));
break;
}
case OpacityQuantum:
{
- *q=ScaleQuantumToChar(GetOpacityPixelComponent(p));
+ *q=ScaleQuantumToChar(GetPixelOpacity(p));
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=ScaleQuantumToChar(GetIndexPixelComponent(indexes+x));
+ *q=ScaleQuantumToChar(GetPixelIndex(indexes+x));
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(double) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(double) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetAlphaPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelAlpha(p))*
quantum_info->scale+quantum_info->minimum);
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(double) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
*q++=0.0;
p++;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(double) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(double) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetAlphaPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelAlpha(p))*
quantum_info->scale+quantum_info->minimum);
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(double) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(double) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(double) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
*q++=0.0;
p++;
case RedQuantum:
case CyanQuantum:
{
- *q=(double) ((QuantumScale*GetRedPixelComponent(p))*
+ *q=(double) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=(double) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q=(double) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=(double) ((QuantumScale*GetBluePixelComponent(p))*
+ *q=(double) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
break;
}
case AlphaQuantum:
{
- *q=(double) ((QuantumScale*GetAlphaPixelComponent(p))*
+ *q=(double) ((QuantumScale*GetPixelAlpha(p))*
quantum_info->scale+quantum_info->minimum);
break;
}
case OpacityQuantum:
{
- *q=(double) ((QuantumScale*GetOpacityPixelComponent(p))*
+ *q=(double) ((QuantumScale*GetPixelOpacity(p))*
quantum_info->scale+quantum_info->minimum);
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=(double) ((QuantumScale*GetIndexPixelComponent(indexes+x))*
+ *q=(double) ((QuantumScale*GetPixelIndex(indexes+x))*
quantum_info->scale+quantum_info->minimum);
break;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(float) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(float) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*(Quantum) (GetAlphaPixelComponent(p)))*
+ *q++=(float) ((QuantumScale*(Quantum) (GetPixelAlpha(p)))*
quantum_info->scale+quantum_info->minimum);
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(float) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
*q++=0.0;
p++;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(float) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(float) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetAlphaPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelAlpha(p))*
quantum_info->scale+quantum_info->minimum);
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(float) ((QuantumScale*GetRedPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
- *q++=(float) ((QuantumScale*GetBluePixelComponent(p))*
+ *q++=(float) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
*q++=0.0;
p++;
case RedQuantum:
case CyanQuantum:
{
- *q=(float) ((QuantumScale*GetRedPixelComponent(p))*
+ *q=(float) ((QuantumScale*GetPixelRed(p))*
quantum_info->scale+quantum_info->minimum);
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=(float) ((QuantumScale*GetGreenPixelComponent(p))*
+ *q=(float) ((QuantumScale*GetPixelGreen(p))*
quantum_info->scale+quantum_info->minimum);
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=(float) ((QuantumScale*GetBluePixelComponent(p))*
+ *q=(float) ((QuantumScale*GetPixelBlue(p))*
quantum_info->scale+quantum_info->minimum);
break;
}
case AlphaQuantum:
{
- *q=(float) ((QuantumScale*GetAlphaPixelComponent(p))*
+ *q=(float) ((QuantumScale*GetPixelAlpha(p))*
quantum_info->scale+quantum_info->minimum);
break;
}
case OpacityQuantum:
{
- *q=(float) ((QuantumScale*GetOpacityPixelComponent(p))*
+ *q=(float) ((QuantumScale*GetPixelOpacity(p))*
quantum_info->scale+quantum_info->minimum);
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=(float) ((QuantumScale*GetIndexPixelComponent(indexes+x))*
+ *q=(float) ((QuantumScale*GetPixelIndex(indexes+x))*
quantum_info->scale+quantum_info->minimum);
break;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
*q++=(unsigned int) ScaleQuantumToLong((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
*q++=0U;
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
*q++=(unsigned int) ScaleQuantumToLong((Quantum)
- (GetAlphaPixelComponent(p)));
+ (GetPixelAlpha(p)));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
*q++=0U;
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=(unsigned int) ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q=(unsigned int) ScaleQuantumToLong(GetPixelRed(p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=(unsigned int) ScaleQuantumToLong(GetGreenPixelComponent(p));
+ *q=(unsigned int) ScaleQuantumToLong(GetPixelGreen(p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=(unsigned int) ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q=(unsigned int) ScaleQuantumToLong(GetPixelBlue(p));
break;
}
case AlphaQuantum:
{
*q=(unsigned int) ScaleQuantumToLong((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p)));
+ GetPixelOpacity(p)));
break;
}
case OpacityQuantum:
{
- *q=(unsigned int) ScaleQuantumToLong(GetOpacityPixelComponent(p));
+ *q=(unsigned int) ScaleQuantumToLong(GetPixelOpacity(p));
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=(unsigned int) ScaleQuantumToLong(GetIndexPixelComponent(
+ *q=(unsigned int) ScaleQuantumToLong(GetPixelIndex(
indexes+x));
break;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=ScaleQuantumToLong((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
+ *q++=ScaleQuantumToLong((Quantum) (GetPixelAlpha(p)));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
*q++=0;
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
- *q++=ScaleQuantumToLong((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
+ *q++=ScaleQuantumToLong((Quantum) (GetPixelAlpha(p)));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToLong(GetRedPixelComponent(p));
- *q++=ScaleQuantumToLong(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToLong(GetPixelRed(p));
+ *q++=ScaleQuantumToLong(GetPixelGreen(p));
+ *q++=ScaleQuantumToLong(GetPixelBlue(p));
*q++=0;
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=ScaleQuantumToLong(GetRedPixelComponent(p));
+ *q=ScaleQuantumToLong(GetPixelRed(p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=ScaleQuantumToLong(GetGreenPixelComponent(p));
+ *q=ScaleQuantumToLong(GetPixelGreen(p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=ScaleQuantumToLong(GetBluePixelComponent(p));
+ *q=ScaleQuantumToLong(GetPixelBlue(p));
break;
}
case AlphaQuantum:
{
- *q=ScaleQuantumToLong((Quantum) (GetAlphaPixelComponent(p)));
+ *q=ScaleQuantumToLong((Quantum) (GetPixelAlpha(p)));
break;
}
case OpacityQuantum:
{
- *q=ScaleQuantumToLong(GetOpacityPixelComponent(p));
+ *q=ScaleQuantumToLong(GetPixelOpacity(p));
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=ScaleQuantumToLong(GetIndexPixelComponent(indexes+x));
+ *q=ScaleQuantumToLong(GetPixelIndex(indexes+x));
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=GetBluePixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetRedPixelComponent(p);
+ *q++=GetPixelBlue(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelRed(p);
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=GetBluePixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetRedPixelComponent(p);
- *q++=(Quantum) (GetAlphaPixelComponent(p));
+ *q++=GetPixelBlue(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelRed(p);
+ *q++=(Quantum) (GetPixelAlpha(p));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=GetBluePixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetRedPixelComponent(p);
+ *q++=GetPixelBlue(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelRed(p);
*q++=0;
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=GetRedPixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetBluePixelComponent(p);
+ *q++=GetPixelRed(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelBlue(p);
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=GetRedPixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetBluePixelComponent(p);
- *q++=(Quantum) (GetAlphaPixelComponent(p));
+ *q++=GetPixelRed(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelBlue(p);
+ *q++=(Quantum) (GetPixelAlpha(p));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=GetRedPixelComponent(p);
- *q++=GetGreenPixelComponent(p);
- *q++=GetBluePixelComponent(p);
+ *q++=GetPixelRed(p);
+ *q++=GetPixelGreen(p);
+ *q++=GetPixelBlue(p);
*q++=0U;
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=GetRedPixelComponent(p);
+ *q=GetPixelRed(p);
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=GetGreenPixelComponent(p);
+ *q=GetPixelGreen(p);
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=GetBluePixelComponent(p);
+ *q=GetPixelBlue(p);
break;
}
case AlphaQuantum:
{
- *q=(Quantum) (GetAlphaPixelComponent(p));
+ *q=(Quantum) (GetPixelAlpha(p));
break;
}
case OpacityQuantum:
{
- *q=GetOpacityPixelComponent(p);
+ *q=GetPixelOpacity(p);
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=GetIndexPixelComponent(indexes+x);
+ *q=GetPixelIndex(indexes+x);
break;
}
case IndexQuantum:
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
- *q++=ScaleQuantumToShort((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
+ *q++=ScaleQuantumToShort((Quantum) (GetPixelAlpha(p)));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
*q++=0;
p++;
}
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
- *q++=ScaleQuantumToShort((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
+ *q++=ScaleQuantumToShort((Quantum) (GetPixelAlpha(p)));
p++;
}
break;
break;
for (x=0; x < (ssize_t) GetImageExtent(image); x++)
{
- *q++=ScaleQuantumToShort(GetRedPixelComponent(p));
- *q++=ScaleQuantumToShort(GetGreenPixelComponent(p));
- *q++=ScaleQuantumToShort(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToShort(GetPixelRed(p));
+ *q++=ScaleQuantumToShort(GetPixelGreen(p));
+ *q++=ScaleQuantumToShort(GetPixelBlue(p));
*q++=0;
p++;
}
case RedQuantum:
case CyanQuantum:
{
- *q=ScaleQuantumToShort(GetRedPixelComponent(p));
+ *q=ScaleQuantumToShort(GetPixelRed(p));
break;
}
case GreenQuantum:
case MagentaQuantum:
{
- *q=ScaleQuantumToShort(GetGreenPixelComponent(p));
+ *q=ScaleQuantumToShort(GetPixelGreen(p));
break;
}
case BlueQuantum:
case YellowQuantum:
{
- *q=ScaleQuantumToShort(GetBluePixelComponent(p));
+ *q=ScaleQuantumToShort(GetPixelBlue(p));
break;
}
case AlphaQuantum:
{
- *q=ScaleQuantumToShort((Quantum) (GetAlphaPixelComponent(p)));
+ *q=ScaleQuantumToShort((Quantum) (GetPixelAlpha(p)));
break;
}
case OpacityQuantum:
{
- *q=ScaleQuantumToShort(GetOpacityPixelComponent(p));
+ *q=ScaleQuantumToShort(GetPixelOpacity(p));
break;
}
case BlackQuantum:
{
if (image->colorspace == CMYKColorspace)
- *q=ScaleQuantumToShort(GetIndexPixelComponent(indexes+x));
+ *q=ScaleQuantumToShort(GetPixelIndex(indexes+x));
break;
}
case IndexQuantum:
pixel.blue+=r[u].blue;
pixel.opacity+=r[u].opacity;
if (image->colorspace == CMYKColorspace)
- pixel.index=(MagickRealType) GetIndexPixelComponent(
+ pixel.index=(MagickRealType) GetPixelIndex(
indexes+x+(r-p)+u);
}
r+=image->columns+width;
mean.opacity=(MagickRealType) (pixel.opacity/number_pixels+offset);
if (image->colorspace == CMYKColorspace)
mean.index=(MagickRealType) (pixel.index/number_pixels+offset);
- SetRedPixelComponent(q,((MagickRealType) GetRedPixelComponent(q) <=
+ SetPixelRed(q,((MagickRealType) GetPixelRed(q) <=
mean.red) ? 0 : QuantumRange);
- SetGreenPixelComponent(q,((MagickRealType) GetGreenPixelComponent(q) <=
+ SetPixelGreen(q,((MagickRealType) GetPixelGreen(q) <=
mean.green) ? 0 : QuantumRange);
- SetBluePixelComponent(q,((MagickRealType) GetBluePixelComponent(q) <=
+ SetPixelBlue(q,((MagickRealType) GetPixelBlue(q) <=
mean.blue) ? 0 : QuantumRange);
- SetOpacityPixelComponent(q,((MagickRealType) GetOpacityPixelComponent(q)
+ SetPixelOpacity(q,((MagickRealType) GetPixelOpacity(q)
<= mean.opacity) ? 0 : QuantumRange);
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(threshold_indexes+x,(((MagickRealType)
- GetIndexPixelComponent(threshold_indexes+x) <= mean.index) ? 0 :
+ SetPixelIndex(threshold_indexes+x,(((MagickRealType)
+ GetPixelIndex(threshold_indexes+x) <= mean.index) ? 0 :
QuantumRange));
p++;
q++;
{
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,(MagickRealType) PixelIntensityToQuantum(q) <=
+ SetPixelRed(q,(MagickRealType) PixelIntensityToQuantum(q) <=
threshold ? 0 : QuantumRange);
- SetGreenPixelComponent(q,GetRedPixelComponent(q));
- SetBluePixelComponent(q,GetRedPixelComponent(q));
+ SetPixelGreen(q,GetPixelRed(q));
+ SetPixelBlue(q,GetPixelRed(q));
q++;
}
}
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,(MagickRealType) GetRedPixelComponent(q) <=
+ SetPixelRed(q,(MagickRealType) GetPixelRed(q) <=
threshold ? 0 : QuantumRange);
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,(MagickRealType) GetGreenPixelComponent(q) <=
+ SetPixelGreen(q,(MagickRealType) GetPixelGreen(q) <=
threshold ? 0 : QuantumRange);
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,(MagickRealType) GetBluePixelComponent(q) <=
+ SetPixelBlue(q,(MagickRealType) GetPixelBlue(q) <=
threshold ? 0 : QuantumRange);
if ((channel & OpacityChannel) != 0)
{
if (image->matte == MagickFalse)
- SetOpacityPixelComponent(q,(MagickRealType)
- GetOpacityPixelComponent(q) <= threshold ? 0 : QuantumRange);
+ SetPixelOpacity(q,(MagickRealType)
+ GetPixelOpacity(q) <= threshold ? 0 : QuantumRange);
else
- SetOpacityPixelComponent(q,(MagickRealType)
- GetOpacityPixelComponent(q) <= threshold ? OpaqueOpacity :
+ SetPixelOpacity(q,(MagickRealType)
+ GetPixelOpacity(q) <= threshold ? OpaqueOpacity :
TransparentOpacity);
}
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,(MagickRealType)
- GetIndexPixelComponent(indexes+x) <= threshold ? 0 : QuantumRange);
+ SetPixelIndex(indexes+x,(MagickRealType)
+ GetPixelIndex(indexes+x) <= threshold ? 0 : QuantumRange);
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
{
if (PixelIntensity(q) < MagickPixelIntensity(&threshold))
{
- SetRedPixelComponent(q,0);
- SetGreenPixelComponent(q,0);
- SetBluePixelComponent(q,0);
+ SetPixelRed(q,0);
+ SetPixelGreen(q,0);
+ SetPixelBlue(q,0);
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(indexes+x,0);
+ SetPixelIndex(indexes+x,0);
}
}
else
{
if (((channel & RedChannel) != 0) &&
- ((MagickRealType) GetRedPixelComponent(q) < threshold.red))
- SetRedPixelComponent(q,0);
+ ((MagickRealType) GetPixelRed(q) < threshold.red))
+ SetPixelRed(q,0);
if (((channel & GreenChannel) != 0) &&
- ((MagickRealType) GetGreenPixelComponent(q) < threshold.green))
- SetGreenPixelComponent(q,0);
+ ((MagickRealType) GetPixelGreen(q) < threshold.green))
+ SetPixelGreen(q,0);
if (((channel & BlueChannel) != 0) &&
- ((MagickRealType) GetBluePixelComponent(q) < threshold.blue))
- SetBluePixelComponent(q,0);
+ ((MagickRealType) GetPixelBlue(q) < threshold.blue))
+ SetPixelBlue(q,0);
if (((channel & OpacityChannel) != 0) &&
- ((MagickRealType) GetOpacityPixelComponent(q) < threshold.opacity))
- SetOpacityPixelComponent(q,0);
+ ((MagickRealType) GetPixelOpacity(q) < threshold.opacity))
+ SetPixelOpacity(q,0);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace) &&
- ((MagickRealType) GetIndexPixelComponent(indexes+x) <
+ ((MagickRealType) GetPixelIndex(indexes+x) <
threshold.index))
- SetIndexPixelComponent(indexes+x,0);
+ SetPixelIndex(indexes+x,0);
}
q++;
}
q=image->colormap;
for (i=0; i < (ssize_t) image->colors; i++)
{
- SetRedPixelComponent(q,ClampToUnsignedQuantum(
- GetRedPixelComponent(q)));
- SetGreenPixelComponent(q,ClampToUnsignedQuantum(
- GetGreenPixelComponent(q)));
- SetBluePixelComponent(q,ClampToUnsignedQuantum(
- GetBluePixelComponent(q)));
- SetOpacityPixelComponent(q,ClampToUnsignedQuantum(
- GetOpacityPixelComponent(q)));
+ SetPixelRed(q,ClampToUnsignedQuantum(
+ GetPixelRed(q)));
+ SetPixelGreen(q,ClampToUnsignedQuantum(
+ GetPixelGreen(q)));
+ SetPixelBlue(q,ClampToUnsignedQuantum(
+ GetPixelBlue(q)));
+ SetPixelOpacity(q,ClampToUnsignedQuantum(
+ GetPixelOpacity(q)));
q++;
}
return(SyncImage(image));
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,ClampToUnsignedQuantum(
- GetRedPixelComponent(q)));
+ SetPixelRed(q,ClampToUnsignedQuantum(
+ GetPixelRed(q)));
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,ClampToUnsignedQuantum(
- GetGreenPixelComponent(q)));
+ SetPixelGreen(q,ClampToUnsignedQuantum(
+ GetPixelGreen(q)));
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,ClampToUnsignedQuantum(
- GetBluePixelComponent(q)));
+ SetPixelBlue(q,ClampToUnsignedQuantum(
+ GetPixelBlue(q)));
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,ClampToUnsignedQuantum(
- GetOpacityPixelComponent(q)));
+ SetPixelOpacity(q,ClampToUnsignedQuantum(
+ GetPixelOpacity(q)));
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,ClampToUnsignedQuantum(
- GetIndexPixelComponent(indexes+x)));
+ SetPixelIndex(indexes+x,ClampToUnsignedQuantum(
+ GetPixelIndex(indexes+x)));
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
Opacity is inverted so 'off' represents transparent.
*/
if (levels.red) {
- t = (ssize_t) (QuantumScale*GetRedPixelComponent(q)*(levels.red*d+1));
+ t = (ssize_t) (QuantumScale*GetPixelRed(q)*(levels.red*d+1));
l = t/d; t = t-l*d;
- SetRedPixelComponent(q,RoundToQuantum((MagickRealType)
+ SetPixelRed(q,RoundToQuantum((MagickRealType)
((l+(t >= threshold))*(MagickRealType) QuantumRange/levels.red)));
}
if (levels.green) {
- t = (ssize_t) (QuantumScale*GetGreenPixelComponent(q)*
+ t = (ssize_t) (QuantumScale*GetPixelGreen(q)*
(levels.green*d+1));
l = t/d; t = t-l*d;
- SetGreenPixelComponent(q,RoundToQuantum((MagickRealType)
+ SetPixelGreen(q,RoundToQuantum((MagickRealType)
((l+(t >= threshold))*(MagickRealType) QuantumRange/levels.green)));
}
if (levels.blue) {
- t = (ssize_t) (QuantumScale*GetBluePixelComponent(q)*
+ t = (ssize_t) (QuantumScale*GetPixelBlue(q)*
(levels.blue*d+1));
l = t/d; t = t-l*d;
- SetBluePixelComponent(q,RoundToQuantum((MagickRealType)
+ SetPixelBlue(q,RoundToQuantum((MagickRealType)
((l+(t >= threshold))*(MagickRealType) QuantumRange/levels.blue)));
}
if (levels.opacity) {
- t = (ssize_t) ((1.0-QuantumScale*GetOpacityPixelComponent(q))*
+ t = (ssize_t) ((1.0-QuantumScale*GetPixelOpacity(q))*
(levels.opacity*d+1));
l = t/d; t = t-l*d;
- SetOpacityPixelComponent(q,RoundToQuantum((MagickRealType)
+ SetPixelOpacity(q,RoundToQuantum((MagickRealType)
((1.0-l-(t >= threshold))*(MagickRealType) QuantumRange/
levels.opacity)));
}
if (levels.index) {
- t = (ssize_t) (QuantumScale*GetIndexPixelComponent(indexes+x)*
+ t = (ssize_t) (QuantumScale*GetPixelIndex(indexes+x)*
(levels.index*d+1));
l = t/d; t = t-l*d;
- SetIndexPixelComponent(indexes+x,RoundToQuantum((MagickRealType) ((l+
+ SetPixelIndex(indexes+x,RoundToQuantum((MagickRealType) ((l+
(t>=threshold))*(MagickRealType) QuantumRange/levels.index)));
}
q++;
threshold.index=(MagickRealType)(QuantumRange*
GetPseudoRandomValue(random_info[id]));
index=(IndexPacket) (intensity <= threshold.index ? 0 : 1);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,image->colormap+(ssize_t) index);
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,image->colormap+(ssize_t) index);
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
{
if ((channel & RedChannel) != 0)
{
- if ((MagickRealType) GetRedPixelComponent(q) < min_threshold)
+ if ((MagickRealType) GetPixelRed(q) < min_threshold)
threshold.red=min_threshold;
else
- if ((MagickRealType) GetRedPixelComponent(q) > max_threshold)
+ if ((MagickRealType) GetPixelRed(q) > max_threshold)
threshold.red=max_threshold;
else
threshold.red=(MagickRealType) (QuantumRange*
}
if ((channel & GreenChannel) != 0)
{
- if ((MagickRealType) GetGreenPixelComponent(q) < min_threshold)
+ if ((MagickRealType) GetPixelGreen(q) < min_threshold)
threshold.green=min_threshold;
else
- if ((MagickRealType) GetGreenPixelComponent(q) > max_threshold)
+ if ((MagickRealType) GetPixelGreen(q) > max_threshold)
threshold.green=max_threshold;
else
threshold.green=(MagickRealType) (QuantumRange*
}
if ((channel & BlueChannel) != 0)
{
- if ((MagickRealType) GetBluePixelComponent(q) < min_threshold)
+ if ((MagickRealType) GetPixelBlue(q) < min_threshold)
threshold.blue=min_threshold;
else
- if ((MagickRealType) GetBluePixelComponent(q) > max_threshold)
+ if ((MagickRealType) GetPixelBlue(q) > max_threshold)
threshold.blue=max_threshold;
else
threshold.blue=(MagickRealType) (QuantumRange*
}
if ((channel & OpacityChannel) != 0)
{
- if ((MagickRealType) GetOpacityPixelComponent(q) < min_threshold)
+ if ((MagickRealType) GetPixelOpacity(q) < min_threshold)
threshold.opacity=min_threshold;
else
- if ((MagickRealType) GetOpacityPixelComponent(q) > max_threshold)
+ if ((MagickRealType) GetPixelOpacity(q) > max_threshold)
threshold.opacity=max_threshold;
else
threshold.opacity=(MagickRealType) (QuantumRange*
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
{
- if ((MagickRealType) GetIndexPixelComponent(indexes+x) < min_threshold)
+ if ((MagickRealType) GetPixelIndex(indexes+x) < min_threshold)
threshold.index=min_threshold;
else
- if ((MagickRealType) GetIndexPixelComponent(indexes+x) > max_threshold)
+ if ((MagickRealType) GetPixelIndex(indexes+x) > max_threshold)
threshold.index=max_threshold;
else
threshold.index=(MagickRealType) (QuantumRange*
GetPseudoRandomValue(random_info[id]));
}
if ((channel & RedChannel) != 0)
- SetRedPixelComponent(q,(MagickRealType) GetRedPixelComponent(q) <=
+ SetPixelRed(q,(MagickRealType) GetPixelRed(q) <=
threshold.red ? 0 : QuantumRange);
if ((channel & GreenChannel) != 0)
- SetGreenPixelComponent(q,(MagickRealType) GetGreenPixelComponent(q) <=
+ SetPixelGreen(q,(MagickRealType) GetPixelGreen(q) <=
threshold.green ? 0 : QuantumRange);
if ((channel & BlueChannel) != 0)
- SetBluePixelComponent(q,(MagickRealType) GetBluePixelComponent(q) <=
+ SetPixelBlue(q,(MagickRealType) GetPixelBlue(q) <=
threshold.blue ? 0 : QuantumRange);
if ((channel & OpacityChannel) != 0)
- SetOpacityPixelComponent(q,(MagickRealType) GetOpacityPixelComponent(q)
+ SetPixelOpacity(q,(MagickRealType) GetPixelOpacity(q)
<= threshold.opacity ? 0 : QuantumRange);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- SetIndexPixelComponent(indexes+x,(MagickRealType)
- GetIndexPixelComponent(indexes+x) <= threshold.index ? 0 :
+ SetPixelIndex(indexes+x,(MagickRealType)
+ GetPixelIndex(indexes+x) <= threshold.index ? 0 :
QuantumRange);
q++;
}
{
if (PixelIntensity(q) > MagickPixelIntensity(&threshold))
{
- SetRedPixelComponent(q,QuantumRange);
- SetGreenPixelComponent(q,QuantumRange);
- SetBluePixelComponent(q,QuantumRange);
+ SetPixelRed(q,QuantumRange);
+ SetPixelGreen(q,QuantumRange);
+ SetPixelBlue(q,QuantumRange);
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(indexes+x,QuantumRange);
+ SetPixelIndex(indexes+x,QuantumRange);
}
}
else
{
if (((channel & RedChannel) != 0) &&
- ((MagickRealType) GetRedPixelComponent(q) > threshold.red))
- SetRedPixelComponent(q,QuantumRange);
+ ((MagickRealType) GetPixelRed(q) > threshold.red))
+ SetPixelRed(q,QuantumRange);
if (((channel & GreenChannel) != 0) &&
- ((MagickRealType) GetGreenPixelComponent(q) > threshold.green))
- SetGreenPixelComponent(q,QuantumRange);
+ ((MagickRealType) GetPixelGreen(q) > threshold.green))
+ SetPixelGreen(q,QuantumRange);
if (((channel & BlueChannel) != 0) &&
- ((MagickRealType) GetBluePixelComponent(q) > threshold.blue))
- SetBluePixelComponent(q,QuantumRange);
+ ((MagickRealType) GetPixelBlue(q) > threshold.blue))
+ SetPixelBlue(q,QuantumRange);
if (((channel & OpacityChannel) != 0) &&
- ((MagickRealType) GetOpacityPixelComponent(q) > threshold.opacity))
- SetOpacityPixelComponent(q,QuantumRange);
+ ((MagickRealType) GetPixelOpacity(q) > threshold.opacity))
+ SetPixelOpacity(q,QuantumRange);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace) &&
- ((MagickRealType) GetIndexPixelComponent(indexes+x)) >
+ ((MagickRealType) GetPixelIndex(indexes+x)) >
threshold.index)
- SetIndexPixelComponent(indexes+x,QuantumRange);
+ SetPixelIndex(indexes+x,QuantumRange);
}
q++;
}
if (indexes != (IndexPacket *) NULL)
{
if (chop_indexes != (IndexPacket *) NULL)
- *chop_indexes++=GetIndexPixelComponent(indexes+x);
+ *chop_indexes++=GetPixelIndex(indexes+x);
}
q++;
}
if (indexes != (IndexPacket *) NULL)
{
if (chop_indexes != (IndexPacket *) NULL)
- *chop_indexes++=GetIndexPixelComponent(indexes+x);
+ *chop_indexes++=GetPixelIndex(indexes+x);
}
q++;
}
break;
for (x=0; x < (ssize_t) images->columns; x++)
{
- SetRedPixelComponent(q,QuantumRange-PixelIntensityToQuantum(p));
+ SetPixelRed(q,QuantumRange-PixelIntensityToQuantum(p));
p++;
q++;
}
indexes=GetCacheViewAuthenticIndexQueue(cmyk_view);
for (x=0; x < (ssize_t) images->columns; x++)
{
- SetIndexPixelComponent(indexes+x,QuantumRange-
+ SetPixelIndex(indexes+x,QuantumRange-
PixelIntensityToQuantum(p));
p++;
}
(*--q)=(*p++);
if ((indexes != (const IndexPacket *) NULL) &&
(flop_indexes != (IndexPacket *) NULL))
- SetIndexPixelComponent(flop_indexes+flop_image->columns-x-1,
- GetIndexPixelComponent( indexes+x));
+ SetPixelIndex(flop_indexes+flop_image->columns-x-1,
+ GetPixelIndex( indexes+x));
}
if (SyncCacheViewAuthenticPixels(flop_view,exception) == MagickFalse)
status=MagickFalse;
splice_indexes=GetCacheViewAuthenticIndexQueue(splice_view);
for (x=0; x < splice_geometry.x; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(splice_indexes+x,
- GetIndexPixelComponent(indexes));
+ SetPixelIndex(splice_indexes+x,
+ GetPixelIndex(indexes));
indexes++;
p++;
q++;
q++;
for ( ; x < (ssize_t) splice_image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(splice_indexes+x,
- GetIndexPixelComponent(indexes));
+ SetPixelIndex(splice_indexes+x,
+ GetPixelIndex(indexes));
indexes++;
p++;
q++;
splice_indexes=GetCacheViewAuthenticIndexQueue(splice_view);
for (x=0; x < splice_geometry.x; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(splice_indexes+x,
- GetIndexPixelComponent(indexes));
+ SetPixelIndex(splice_indexes+x,
+ GetPixelIndex(indexes));
indexes++;
p++;
q++;
q++;
for ( ; x < (ssize_t) splice_image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
- SetBluePixelComponent(q,GetBluePixelComponent(p));
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelRed(q,GetPixelRed(p));
+ SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelBlue(q,GetPixelBlue(p));
+ SetPixelOpacity(q,OpaqueOpacity);
if (image->matte != MagickFalse)
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
if (image->colorspace == CMYKColorspace)
- SetIndexPixelComponent(splice_indexes+x,
- GetIndexPixelComponent(indexes));
+ SetPixelIndex(splice_indexes+x,
+ GetPixelIndex(indexes));
indexes++;
p++;
q++;
transverse_indexes=GetCacheViewAuthenticIndexQueue(transverse_view);
if (transverse_indexes != (IndexPacket *) NULL)
for (x=0; x < (ssize_t) image->columns; x++)
- SetIndexPixelComponent(transverse_indexes+image->columns-x-1,
- GetIndexPixelComponent(indexes+x));
+ SetPixelIndex(transverse_indexes+image->columns-x-1,
+ GetPixelIndex(indexes+x));
}
sync=SyncCacheViewAuthenticPixels(transverse_view,exception);
if (sync == MagickFalse)
#define MagickLibAddendum "-9"
#define MagickLibInterface 4
#define MagickLibMinInterface 4
-#define MagickReleaseDate "2011-06-15"
-#define MagickChangeDate "20110615"
+#define MagickReleaseDate "2011-06-25"
+#define MagickChangeDate "20110618"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#define MagickOpenMPFeature "OpenMP "
break;
for (x=0; x < (int) annotate_image->columns; x++)
{
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
if (XGetPixel(annotate_ximage,x,y) == 0)
{
/*
Set this pixel to the background color.
*/
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel->box_color.red));
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel->box_color.green));
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel->box_color.blue));
+ SetPixelRed(q,ScaleShortToQuantum(pixel->box_color.red));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel->box_color.green));
+ SetPixelBlue(q,ScaleShortToQuantum(pixel->box_color.blue));
if ((annotate_info->stencil == ForegroundStencil) ||
(annotate_info->stencil == OpaqueStencil))
- SetOpacityPixelComponent(q,TransparentOpacity);
+ SetPixelOpacity(q,TransparentOpacity);
}
else
{
/*
Set this pixel to the pen color.
*/
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel->pen_color.red));
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel->pen_color.green));
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel->pen_color.blue));
+ SetPixelRed(q,ScaleShortToQuantum(pixel->pen_color.red));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel->pen_color.green));
+ SetPixelBlue(q,ScaleShortToQuantum(pixel->pen_color.blue));
if (annotate_info->stencil == BackgroundStencil)
- SetOpacityPixelComponent(q,TransparentOpacity);
+ SetPixelOpacity(q,TransparentOpacity);
}
q++;
}
for (x=0; x < (int) image->columns; x++)
{
color.red=ClampToQuantum((MagickRealType) (red_map[i][j][(int)
- ScaleQuantumToChar(GetRedPixelComponent(p))] << 8));
+ ScaleQuantumToChar(GetPixelRed(p))] << 8));
color.green=ClampToQuantum((MagickRealType) (green_map[i][j][(int)
- ScaleQuantumToChar(GetGreenPixelComponent(p))] << 8));
+ ScaleQuantumToChar(GetPixelGreen(p))] << 8));
color.blue=ClampToQuantum((MagickRealType) (blue_map[i][j][(int)
- ScaleQuantumToChar(GetBluePixelComponent(p))] << 8));
+ ScaleQuantumToChar(GetPixelBlue(p))] << 8));
pixel=(size_t) (((size_t) color.red & 0xe0) |
(((size_t) color.green & 0xe0) >> 3) |
(((size_t) color.blue & 0xc0) >> 6));
/*
Set this pixel to the pen color.
*/
- SetRedPixelComponent(q,ScaleShortToQuantum(pixel->pen_color.red));
- SetGreenPixelComponent(q,ScaleShortToQuantum(pixel->pen_color.green));
- SetBluePixelComponent(q,ScaleShortToQuantum(pixel->pen_color.blue));
- SetOpacityPixelComponent(q,(Quantum) (draw_info->stencil ==
+ SetPixelRed(q,ScaleShortToQuantum(pixel->pen_color.red));
+ SetPixelGreen(q,ScaleShortToQuantum(pixel->pen_color.green));
+ SetPixelBlue(q,ScaleShortToQuantum(pixel->pen_color.blue));
+ SetPixelOpacity(q,(Quantum) (draw_info->stencil ==
OpaqueStencil ? OpaqueOpacity : TransparentOpacity));
}
q++;
for (x=0; x < (int) draw_image->columns; x++)
{
if (q->opacity != (Quantum) TransparentOpacity)
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
if (SyncCacheViewAuthenticPixels(draw_view,exception) == MagickFalse)
{
pixel=XGetPixel(ximage,x,y);
index=(pixel >> red_shift) & red_mask;
- SetRedPixelComponent(q,ScaleShortToQuantum(
+ SetPixelRed(q,ScaleShortToQuantum(
colors[index].red));
index=(pixel >> green_shift) & green_mask;
- SetGreenPixelComponent(q,ScaleShortToQuantum(
+ SetPixelGreen(q,ScaleShortToQuantum(
colors[index].green));
index=(pixel >> blue_shift) & blue_mask;
- SetBluePixelComponent(q,ScaleShortToQuantum(
+ SetPixelBlue(q,ScaleShortToQuantum(
colors[index].blue));
q++;
}
pixel=XGetPixel(ximage,x,y);
color=(pixel >> red_shift) & red_mask;
color=(65535UL*color)/red_mask;
- SetRedPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelRed(q,ScaleShortToQuantum((unsigned short)
color));
color=(pixel >> green_shift) & green_mask;
color=(65535UL*color)/green_mask;
- SetGreenPixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelGreen(q,ScaleShortToQuantum((unsigned short)
color));
color=(pixel >> blue_shift) & blue_mask;
color=(65535UL*color)/blue_mask;
- SetBluePixelComponent(q,ScaleShortToQuantum((unsigned short)
+ SetPixelBlue(q,ScaleShortToQuantum((unsigned short)
color));
q++;
}
for (x=0; x < (int) composite_image->columns; x++)
{
index=(IndexPacket) XGetPixel(ximage,x,y);
- SetIndexPixelComponent(indexes+x,index);
- SetRGBOPixelComponents(q,composite_image->colormap+(ssize_t)
+ SetPixelIndex(indexes+x,index);
+ SetPixelRGBO(q,composite_image->colormap+(ssize_t)
index);
q++;
}
for (x=0; x < (int) canvas->columns; x++)
{
byte>>=1;
- if (GetIndexPixelComponent(indexes+x) == (IndexPacket) polarity)
+ if (GetPixelIndex(indexes+x) == (IndexPacket) polarity)
byte|=foreground;
else
byte|=background;
nibble=0;
for (x=0; x < (int) canvas->columns; x++)
{
- pixel=pixels[(ssize_t) GetIndexPixelComponent(indexes+x)] & 0x0f;
+ pixel=pixels[(ssize_t) GetPixelIndex(indexes+x)] & 0x0f;
switch (nibble)
{
case 0:
nibble=0;
for (x=0; x < (int) canvas->columns; x++)
{
- pixel=pixels[(ssize_t) GetIndexPixelComponent(indexes+x)] & 0xf;
+ pixel=pixels[(ssize_t) GetPixelIndex(indexes+x)] & 0xf;
switch (nibble)
{
case 0:
indexes=GetCacheViewVirtualIndexQueue(canvas_view);
for (x=0; x < (int) canvas->columns; x++)
{
- pixel=pixels[(ssize_t) GetIndexPixelComponent(indexes+x)];
+ pixel=pixels[(ssize_t) GetPixelIndex(indexes+x)];
*q++=(unsigned char) pixel;
}
q+=scanline_pad;
indexes=GetCacheViewVirtualIndexQueue(canvas_view);
for (x=0; x < (int) canvas->columns; x++)
{
- pixel=pixels[(ssize_t) GetIndexPixelComponent(indexes+x)];
+ pixel=pixels[(ssize_t) GetPixelIndex(indexes+x)];
for (k=0; k < (int) bytes_per_pixel; k++)
{
channel[k]=(unsigned char) pixel;
for (x=(int) canvas->columns-1; x >= 0; x--)
{
*q++=ScaleQuantumToChar(XBlueGamma(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
*q++=ScaleQuantumToChar(XGreenGamma(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
*q++=ScaleQuantumToChar(XRedGamma(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
*q++=0;
p++;
}
}
for (x=(int) canvas->columns-1; x >= 0; x--)
{
- *q++=ScaleQuantumToChar((Quantum) GetBluePixelComponent(p));
- *q++=ScaleQuantumToChar((Quantum) GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar((Quantum) GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar((Quantum) GetPixelBlue(p));
+ *q++=ScaleQuantumToChar((Quantum) GetPixelGreen(p));
+ *q++=ScaleQuantumToChar((Quantum) GetPixelRed(p));
*q++=0;
p++;
}
for (x=(int) canvas->columns-1; x >= 0; x--)
{
*q++=ScaleQuantumToChar(XRedGamma(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
*q++=ScaleQuantumToChar(XGreenGamma(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
*q++=ScaleQuantumToChar(XBlueGamma(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
*q++=0;
p++;
}
for (x=(int) canvas->columns-1; x >= 0; x--)
{
*q++=ScaleQuantumToChar((Quantum)
- GetRedPixelComponent(p));
+ GetPixelRed(p));
*q++=ScaleQuantumToChar((Quantum)
- GetGreenPixelComponent(p));
+ GetPixelGreen(p));
*q++=ScaleQuantumToChar((Quantum)
- GetBluePixelComponent(p));
+ GetPixelBlue(p));
*q++=0;
p++;
}
for (x=(int) canvas->columns-1; x >= 0; x--)
{
byte>>=1;
- if (GetOpacityPixelComponent(p) > (QuantumRange/2))
+ if (GetPixelOpacity(p) > (QuantumRange/2))
byte|=0x80;
bit++;
if (bit == 8)
for (x=(int) canvas->columns-1; x >= 0; x--)
{
byte<<=1;
- if (GetIndexPixelComponent(indexes+x) == (IndexPacket) polarity)
+ if (GetPixelIndex(indexes+x) == (IndexPacket) polarity)
byte|=foreground;
else
byte|=background;
nibble=0;
for (x=0; x < (int) canvas->columns; x++)
{
- pixel=pixels[(ssize_t) GetIndexPixelComponent(indexes+x)] & 0xf;
+ pixel=pixels[(ssize_t) GetPixelIndex(indexes+x)] & 0xf;
switch (nibble)
{
case 0:
nibble=0;
for (x=0; x < (int) canvas->columns; x++)
{
- pixel=pixels[(ssize_t) GetIndexPixelComponent(indexes+x)] & 0xf;
+ pixel=pixels[(ssize_t) GetPixelIndex(indexes+x)] & 0xf;
switch (nibble)
{
case 0:
indexes=GetCacheViewVirtualIndexQueue(canvas_view);
for (x=0; x < (int) canvas->columns; x++)
{
- pixel=pixels[(ssize_t) GetIndexPixelComponent(indexes+x)];
+ pixel=pixels[(ssize_t) GetPixelIndex(indexes+x)];
*q++=(unsigned char) pixel;
}
q+=scanline_pad;
indexes=GetCacheViewVirtualIndexQueue(canvas_view);
for (x=0; x < (int) canvas->columns; x++)
{
- pixel=pixels[(ssize_t) GetIndexPixelComponent(indexes+x)];
+ pixel=pixels[(ssize_t) GetPixelIndex(indexes+x)];
for (k=(int) bytes_per_pixel-1; k >= 0; k--)
{
channel[k]=(unsigned char) pixel;
{
*q++=0;
*q++=ScaleQuantumToChar(XRedGamma(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
*q++=ScaleQuantumToChar(XGreenGamma(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
*q++=ScaleQuantumToChar(XBlueGamma(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
p++;
}
continue;
for (x=(int) canvas->columns-1; x >= 0; x--)
{
*q++=0;
- *q++=ScaleQuantumToChar((Quantum) GetRedPixelComponent(p));
- *q++=ScaleQuantumToChar((Quantum) GetGreenPixelComponent(p));
- *q++=ScaleQuantumToChar((Quantum) GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar((Quantum) GetPixelRed(p));
+ *q++=ScaleQuantumToChar((Quantum) GetPixelGreen(p));
+ *q++=ScaleQuantumToChar((Quantum) GetPixelBlue(p));
p++;
}
}
{
*q++=0;
*q++=ScaleQuantumToChar(XBlueGamma(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
*q++=ScaleQuantumToChar(XGreenGamma(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
*q++=ScaleQuantumToChar(XRedGamma(
- GetRedPixelComponent(p)));
+ GetPixelRed(p)));
p++;
}
continue;
{
*q++=0;
*q++=ScaleQuantumToChar((Quantum)
- GetBluePixelComponent(p));
+ GetPixelBlue(p));
*q++=ScaleQuantumToChar((Quantum)
- GetGreenPixelComponent(p));
+ GetPixelGreen(p));
*q++=ScaleQuantumToChar((Quantum)
- GetRedPixelComponent(p));
+ GetPixelRed(p));
p++;
}
}
for (x=(int) canvas->columns-1; x >= 0; x--)
{
byte<<=1;
- if (GetOpacityPixelComponent(p) > (QuantumRange/2))
+ if (GetPixelOpacity(p) > (QuantumRange/2))
byte|=0x01;
bit++;
if (bit == 8)
{
for (i=0; i < (ssize_t) number_colors; i++)
{
- SetRedPixelComponent(q,0);
+ SetPixelRed(q,0);
if (map_info->red_max != 0)
- SetRedPixelComponent(q,ScaleXToQuantum((size_t) (i/
+ SetPixelRed(q,ScaleXToQuantum((size_t) (i/
map_info->red_mult),map_info->red_max));
- SetGreenPixelComponent(q,0);
+ SetPixelGreen(q,0);
if (map_info->green_max != 0)
- SetGreenPixelComponent(q,ScaleXToQuantum((size_t) ((i/
+ SetPixelGreen(q,ScaleXToQuantum((size_t) ((i/
map_info->green_mult) % (map_info->green_max+1)),
map_info->green_max));
- SetBluePixelComponent(q,0);
+ SetPixelBlue(q,0);
if (map_info->blue_max != 0)
- SetBluePixelComponent(q,ScaleXToQuantum((size_t) (i %
+ SetPixelBlue(q,ScaleXToQuantum((size_t) (i %
map_info->green_mult),map_info->blue_max));
- SetOpacityPixelComponent(q,TransparentOpacity);
+ SetPixelOpacity(q,TransparentOpacity);
q++;
}
(void) SyncAuthenticPixels(affinity_image,exception);
break;
indexes=GetCacheViewAuthenticIndexQueue(image_view);
for (x=(int) image->columns-1; x >= 0; x--)
- diversity[(ssize_t) GetIndexPixelComponent(indexes+x)].count++;
+ diversity[(ssize_t) GetPixelIndex(indexes+x)].count++;
}
image_view=DestroyCacheView(image_view);
/*
if (source_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) source->region.width; x++)
PixelSetBlackQuantum(source->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
if (source_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) source->region.width; x++)
PixelSetIndex(source->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
duplex_pixels=GetCacheViewVirtualPixels(duplex->view,duplex->region.x,y,
duplex->region.width,1,duplex->exception);
if (duplex_pixels == (const PixelPacket *) NULL)
if (duplex_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) duplex->region.width; x++)
PixelSetBlackQuantum(duplex->pixel_wands[id][x],
- GetIndexPixelComponent(duplex_indexes+x));
+ GetPixelIndex(duplex_indexes+x));
if (duplex_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) duplex->region.width; x++)
PixelSetIndex(duplex->pixel_wands[id][x],
- GetIndexPixelComponent(duplex_indexes+x));
+ GetPixelIndex(duplex_indexes+x));
destination_pixels=GetCacheViewAuthenticPixels(destination->view,
destination->region.x,y,destination->region.width,1,exception);
if (destination_pixels == (PixelPacket *) NULL)
if (destination_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) destination->region.width; x++)
PixelSetBlackQuantum(destination->pixel_wands[id][x],
- GetIndexPixelComponent(destination_indexes+x));
+ GetPixelIndex(destination_indexes+x));
if (destination_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) destination->region.width; x++)
PixelSetIndex(destination->pixel_wands[id][x],
- GetIndexPixelComponent(destination_indexes+x));
+ GetPixelIndex(destination_indexes+x));
if (transfer(source,duplex,destination,context) == MagickFalse)
status=MagickFalse;
for (x=0; x < (ssize_t) destination->region.width; x++)
destination_pixels+x);
if (destination_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) destination->region.width; x++)
- SetIndexPixelComponent(destination_indexes+x,PixelGetBlackQuantum(
+ SetPixelIndex(destination_indexes+x,PixelGetBlackQuantum(
destination->pixel_wands[id][x]));
sync=SyncCacheViewAuthenticPixels(destination->view,exception);
if (sync == MagickFalse)
if (source_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) source->region.width; x++)
PixelSetBlackQuantum(source->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
if (source_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) source->region.width; x++)
PixelSetIndex(source->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
if (get(source,context) == MagickFalse)
status=MagickFalse;
if (source_image->progress_monitor != (MagickProgressMonitor) NULL)
PixelGetQuantumColor(destination->pixel_wands[id][x],pixels+x);
if (destination_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) destination->region.width; x++)
- SetIndexPixelComponent(indexes+x,PixelGetBlackQuantum(
+ SetPixelIndex(indexes+x,PixelGetBlackQuantum(
destination->pixel_wands[id][x]));
sync=SyncCacheViewAuthenticPixels(destination->view,exception);
if (sync == MagickFalse)
if (source_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) source->region.width; x++)
PixelSetBlackQuantum(source->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
if (source_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) source->region.width; x++)
PixelSetIndex(source->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
destination_pixels=GetCacheViewAuthenticPixels(destination->view,
destination->region.x,y,destination->region.width,1,exception);
if (destination_pixels == (PixelPacket *) NULL)
if (destination_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) destination->region.width; x++)
PixelSetBlackQuantum(destination->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
if (destination_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) destination->region.width; x++)
PixelSetIndex(destination->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
if (transfer(source,destination,context) == MagickFalse)
status=MagickFalse;
for (x=0; x < (ssize_t) destination->region.width; x++)
destination_pixels+x);
if (destination_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) destination->region.width; x++)
- SetIndexPixelComponent(destination_indexes+x,PixelGetBlackQuantum(
+ SetPixelIndex(destination_indexes+x,PixelGetBlackQuantum(
destination->pixel_wands[id][x]));
sync=SyncCacheViewAuthenticPixels(destination->view,exception);
if (sync == MagickFalse)
if (source_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) source->region.width; x++)
PixelSetBlackQuantum(source->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
if (update(source,context) == MagickFalse)
status=MagickFalse;
for (x=0; x < (ssize_t) source->region.width; x++)
PixelGetQuantumColor(source->pixel_wands[id][x],pixels+x);
if (source_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) source->region.width; x++)
- SetIndexPixelComponent(indexes+x,PixelGetBlackQuantum(
+ SetPixelIndex(indexes+x,PixelGetBlackQuantum(
source->pixel_wands[id][x]));
if (SyncCacheViewAuthenticPixels(source->view,exception) == MagickFalse)
{
static void MvgAppendColor(DrawingWand *wand,const PixelPacket *color)
{
- if ((GetRedPixelComponent(color) == 0) &&
- (GetGreenPixelComponent(color) == 0) &&
- (GetBluePixelComponent(color) == 0) &&
- (GetOpacityPixelComponent(color) == (Quantum) TransparentOpacity))
+ if ((GetPixelRed(color) == 0) &&
+ (GetPixelGreen(color) == 0) &&
+ (GetPixelBlue(color) == 0) &&
+ (GetPixelOpacity(color) == (Quantum) TransparentOpacity))
(void) MvgPrintf(wand,"none");
else
{
GetMagickPixelPacket(wand->image,&pixel);
pixel.colorspace=RGBColorspace;
pixel.matte=color->opacity != OpaqueOpacity ? MagickTrue : MagickFalse;
- pixel.red=(MagickRealType) GetRedPixelComponent(color);
- pixel.green=(MagickRealType) GetGreenPixelComponent(color);
- pixel.blue=(MagickRealType) GetBluePixelComponent(color);
- pixel.opacity=(MagickRealType) GetOpacityPixelComponent(color);
+ pixel.red=(MagickRealType) GetPixelRed(color);
+ pixel.green=(MagickRealType) GetPixelGreen(color);
+ pixel.blue=(MagickRealType) GetPixelBlue(color);
+ pixel.opacity=(MagickRealType) GetPixelOpacity(color);
GetColorTuple(&pixel,MagickTrue,tuple);
(void) MvgPrintf(wand,"%s",tuple);
}
static inline void SetMagickPixelPacket(const Image *image,
const PixelPacket *color,const IndexPacket *index,MagickPixelPacket *pixel)
{
- pixel->red=(MagickRealType) GetRedPixelComponent(color);
- pixel->green=(MagickRealType) GetGreenPixelComponent(color);
- pixel->blue=(MagickRealType) GetBluePixelComponent(color);
+ pixel->red=(MagickRealType) GetPixelRed(color);
+ pixel->green=(MagickRealType) GetPixelGreen(color);
+ pixel->blue=(MagickRealType) GetPixelBlue(color);
if (image->matte != MagickFalse)
- pixel->opacity=(MagickRealType) GetOpacityPixelComponent(color);
+ pixel->opacity=(MagickRealType) GetPixelOpacity(color);
if (((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass)) &&
(index != (const IndexPacket *) NULL))
- pixel->index=(MagickRealType) GetIndexPixelComponent(index);
+ pixel->index=(MagickRealType) GetPixelIndex(index);
}
WandExport char *DrawGetVectorGraphics(DrawingWand *wand)
static inline MagickBooleanType IsColorEqual(const PixelPacket *p,
const PixelPacket *q)
{
- if (GetRedPixelComponent(p) != GetRedPixelComponent(q))
+ if (GetPixelRed(p) != GetPixelRed(q))
return(MagickFalse);
- if (GetGreenPixelComponent(p) != GetGreenPixelComponent(q))
+ if (GetPixelGreen(p) != GetPixelGreen(q))
return(MagickFalse);
- if (GetBluePixelComponent(p) != GetBluePixelComponent(q))
+ if (GetPixelBlue(p) != GetPixelBlue(q))
return(MagickFalse);
- if (GetOpacityPixelComponent(p) != GetOpacityPixelComponent(q))
+ if (GetPixelOpacity(p) != GetPixelOpacity(q))
return(MagickFalse);
return(MagickTrue);
}
for (x=0; x < (ssize_t) mask_image->columns; x++)
{
if (mask_image->matte == MagickFalse)
- SetOpacityPixelComponent(q,PixelIntensityToQuantum(q));
- SetRedPixelComponent(q,GetOpacityPixelComponent(q));
- SetGreenPixelComponent(q,GetOpacityPixelComponent(q));
- SetBluePixelComponent(q,GetOpacityPixelComponent(q));
+ SetPixelOpacity(q,PixelIntensityToQuantum(q));
+ SetPixelRed(q,GetPixelOpacity(q));
+ SetPixelGreen(q,GetPixelOpacity(q));
+ SetPixelBlue(q,GetPixelOpacity(q));
q++;
}
if (SyncCacheViewAuthenticPixels(mask_view,exception) == MagickFalse)
if (GetCacheViewColorspace(iterator->view) == CMYKColorspace)
for (x=0; x < (ssize_t) iterator->region.width; x++)
PixelSetBlackQuantum(iterator->pixel_wands[x],
- GetBlackPixelComponent(indexes+x));
+ GetPixelBlack(indexes+x));
if (GetCacheViewStorageClass(iterator->view) == PseudoClass)
for (x=0; x < (ssize_t) iterator->region.width; x++)
PixelSetIndex(iterator->pixel_wands[x],
- GetBlackPixelComponent(indexes+x));
+ GetPixelBlack(indexes+x));
*number_wands=iterator->region.width;
return(iterator->pixel_wands);
}
if (GetCacheViewColorspace(iterator->view) == CMYKColorspace)
for (x=0; x < (ssize_t) iterator->region.width; x++)
PixelSetBlackQuantum(iterator->pixel_wands[x],
- GetBlackPixelComponent(indexes+x));
+ GetPixelBlack(indexes+x));
if (GetCacheViewStorageClass(iterator->view) == PseudoClass)
for (x=0; x < (ssize_t) iterator->region.width; x++)
PixelSetIndex(iterator->pixel_wands[x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
*number_wands=iterator->region.width;
return(iterator->pixel_wands);
}
if (GetCacheViewColorspace(iterator->view) == CMYKColorspace)
for (x=0; x < (ssize_t) iterator->region.width; x++)
PixelSetBlackQuantum(iterator->pixel_wands[x],
- GetBlackPixelComponent(indexes+x));
+ GetPixelBlack(indexes+x));
if (GetCacheViewStorageClass(iterator->view) == PseudoClass)
for (x=0; x < (ssize_t) iterator->region.width; x++)
PixelSetIndex(iterator->pixel_wands[x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
*number_wands=iterator->region.width;
return(iterator->pixel_wands);
}
PixelGetQuantumColor(iterator->pixel_wands[x],pixels+x);
if (GetCacheViewColorspace(iterator->view) == CMYKColorspace)
for (x=0; x < (ssize_t) iterator->region.width; x++)
- SetBlackPixelComponent(indexes+x,PixelGetBlackQuantum(
+ SetPixelBlack(indexes+x,PixelGetBlackQuantum(
iterator->pixel_wands[x]));
if (SyncCacheViewAuthenticPixels(iterator->view,exception) == MagickFalse)
{
if (source_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) source->extent.width; x++)
PixelSetBlackQuantum(source->pixel_wands[id][x],
- GetBlackPixelComponent(indexes+x));
+ GetPixelBlack(indexes+x));
if (source_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) source->extent.width; x++)
PixelSetIndex(source->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
duplex_pixels=GetCacheViewVirtualPixels(duplex->view,duplex->extent.x,y,
duplex->extent.width,1,duplex->exception);
if (duplex_pixels == (const PixelPacket *) NULL)
if (duplex_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) duplex->extent.width; x++)
PixelSetBlackQuantum(duplex->pixel_wands[id][x],
- GetBlackPixelComponent(duplex_indexes+x));
+ GetPixelBlack(duplex_indexes+x));
if (duplex_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) duplex->extent.width; x++)
PixelSetIndex(duplex->pixel_wands[id][x],
- GetIndexPixelComponent(duplex_indexes+x));
+ GetPixelIndex(duplex_indexes+x));
destination_pixels=GetCacheViewAuthenticPixels(destination->view,
destination->extent.x,y,destination->extent.width,1,exception);
if (destination_pixels == (PixelPacket *) NULL)
if (destination_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) destination->extent.width; x++)
PixelSetBlackQuantum(destination->pixel_wands[id][x],
- GetBlackPixelComponent(destination_indexes+x));
+ GetPixelBlack(destination_indexes+x));
if (destination_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) destination->extent.width; x++)
PixelSetIndex(destination->pixel_wands[id][x],
- GetIndexPixelComponent(destination_indexes+x));
+ GetPixelIndex(destination_indexes+x));
if (transfer(source,duplex,destination,y,id,context) == MagickFalse)
status=MagickFalse;
for (x=0; x < (ssize_t) destination->extent.width; x++)
destination_pixels+x);
if (destination_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) destination->extent.width; x++)
- SetBlackPixelComponent(destination_indexes+x,PixelGetBlackQuantum(
+ SetPixelBlack(destination_indexes+x,PixelGetBlackQuantum(
destination->pixel_wands[id][x]));
sync=SyncCacheViewAuthenticPixels(destination->view,exception);
if (sync == MagickFalse)
if (source_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) source->extent.width; x++)
PixelSetBlackQuantum(source->pixel_wands[id][x],
- GetBlackPixelComponent(indexes+x));
+ GetPixelBlack(indexes+x));
if (source_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) source->extent.width; x++)
PixelSetIndex(source->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
if (get(source,y,id,context) == MagickFalse)
status=MagickFalse;
if (source_image->progress_monitor != (MagickProgressMonitor) NULL)
PixelGetQuantumColor(destination->pixel_wands[id][x],pixels+x);
if (destination_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) destination->extent.width; x++)
- SetBlackPixelComponent(indexes+x,PixelGetBlackQuantum(
+ SetPixelBlack(indexes+x,PixelGetBlackQuantum(
destination->pixel_wands[id][x]));
sync=SyncCacheViewAuthenticPixels(destination->view,exception);
if (sync == MagickFalse)
if (source_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) source->extent.width; x++)
PixelSetBlackQuantum(source->pixel_wands[id][x],
- GetBlackPixelComponent(indexes+x));
+ GetPixelBlack(indexes+x));
if (source_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) source->extent.width; x++)
PixelSetIndex(source->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
destination_pixels=GetCacheViewAuthenticPixels(destination->view,
destination->extent.x,y,destination->extent.width,1,exception);
if (destination_pixels == (PixelPacket *) NULL)
if (destination_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) destination->extent.width; x++)
PixelSetBlackQuantum(destination->pixel_wands[id][x],
- GetBlackPixelComponent(indexes+x));
+ GetPixelBlack(indexes+x));
if (destination_image->storage_class == PseudoClass)
for (x=0; x < (ssize_t) destination->extent.width; x++)
PixelSetIndex(destination->pixel_wands[id][x],
- GetIndexPixelComponent(indexes+x));
+ GetPixelIndex(indexes+x));
if (transfer(source,destination,y,id,context) == MagickFalse)
status=MagickFalse;
for (x=0; x < (ssize_t) destination->extent.width; x++)
destination_pixels+x);
if (destination_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) destination->extent.width; x++)
- SetBlackPixelComponent(destination_indexes+x,PixelGetBlackQuantum(
+ SetPixelBlack(destination_indexes+x,PixelGetBlackQuantum(
destination->pixel_wands[id][x]));
sync=SyncCacheViewAuthenticPixels(destination->view,exception);
if (sync == MagickFalse)
if (source_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) source->extent.width; x++)
PixelSetBlackQuantum(source->pixel_wands[id][x],
- GetBlackPixelComponent(indexes+x));
+ GetPixelBlack(indexes+x));
if (update(source,y,id,context) == MagickFalse)
status=MagickFalse;
for (x=0; x < (ssize_t) source->extent.width; x++)
PixelGetQuantumColor(source->pixel_wands[id][x],pixels+x);
if (source_image->colorspace == CMYKColorspace)
for (x=0; x < (ssize_t) source->extent.width; x++)
- SetBlackPixelComponent(indexes+x,PixelGetBlackQuantum(
+ SetPixelBlack(indexes+x,PixelGetBlackQuantum(
source->pixel_wands[id][x]));
if (SyncCacheViewAuthenticPixels(source->view,exception) == MagickFalse)
{