summaryrefslogtreecommitdiff
path: root/coders
diff options
context:
space:
mode:
authorcristy <urban-warrior@git.imagemagick.org>2011-06-25 12:26:44 +0000
committercristy <urban-warrior@git.imagemagick.org>2011-06-25 12:26:44 +0000
commitef61831f94757bbb7fd66e3f5d1aca8a19c0b58e (patch)
tree56e3e284afc1918b09429872378cb9f42a1e5a78 /coders
parente0de7e873131752c44ddada3c454f0d9083129ee (diff)
downloadImageMagick-ef61831f94757bbb7fd66e3f5d1aca8a19c0b58e.tar.gz
Diffstat (limited to 'coders')
-rw-r--r--coders/aai.c16
-rw-r--r--coders/avs.c16
-rw-r--r--coders/bgr.c36
-rw-r--r--coders/bmp.c60
-rw-r--r--coders/braille.c4
-rw-r--r--coders/clipboard.c8
-rw-r--r--coders/cmyk.c42
-rw-r--r--coders/cut.c38
-rw-r--r--coders/dcm.c26
-rw-r--r--coders/dds.c38
-rw-r--r--coders/dib.c50
-rw-r--r--coders/djvu.c8
-rw-r--r--coders/dps.c18
-rw-r--r--coders/emf.c8
-rw-r--r--coders/exr.c16
-rw-r--r--coders/fits.c6
-rw-r--r--coders/fpx.c18
-rw-r--r--coders/gif.c8
-rw-r--r--coders/gray.c6
-rw-r--r--coders/hald.c8
-rw-r--r--coders/hdr.c28
-rw-r--r--coders/histogram.c12
-rw-r--r--coders/hrz.c14
-rw-r--r--coders/icon.c42
-rw-r--r--coders/jbig.c4
-rw-r--r--coders/jp2.c28
-rw-r--r--coders/jpeg.c72
-rw-r--r--coders/mac.c4
-rw-r--r--coders/map.c8
-rw-r--r--coders/mat.c74
-rw-r--r--coders/matte.c8
-rw-r--r--coders/miff.c46
-rw-r--r--coders/mono.c4
-rw-r--r--coders/mtv.c14
-rw-r--r--coders/otb.c2
-rw-r--r--coders/palm.c42
-rw-r--r--coders/pcd.c18
-rw-r--r--coders/pcl.c8
-rw-r--r--coders/pcx.c22
-rw-r--r--coders/pdb.c14
-rw-r--r--coders/pdf.c44
-rw-r--r--coders/pict.c38
-rw-r--r--coders/pix.c8
-rw-r--r--coders/plasma.c8
-rw-r--r--coders/png.c488
-rw-r--r--coders/pnm.c198
-rw-r--r--coders/ps.c34
-rw-r--r--coders/ps2.c36
-rw-r--r--coders/ps3.c16
-rw-r--r--coders/psd.c36
-rw-r--r--coders/raw.c6
-rw-r--r--coders/rgb.c36
-rw-r--r--coders/rla.c16
-rw-r--r--coders/rle.c18
-rw-r--r--coders/scr.c12
-rw-r--r--coders/sct.c12
-rw-r--r--coders/sgi.c36
-rw-r--r--coders/stegano.c6
-rw-r--r--coders/sun.c42
-rw-r--r--coders/svg.c6
-rw-r--r--coders/tga.c22
-rw-r--r--coders/tiff.c30
-rw-r--r--coders/tim.c20
-rw-r--r--coders/txt.c10
-rw-r--r--coders/uil.c8
-rw-r--r--coders/uyvy.c24
-rw-r--r--coders/viff.c40
-rw-r--r--coders/wbmp.c2
-rw-r--r--coders/webp.c16
-rw-r--r--coders/wpg.c58
-rw-r--r--coders/xbm.c2
-rw-r--r--coders/xc.c2
-rw-r--r--coders/xcf.c56
-rw-r--r--coders/xpm.c14
-rw-r--r--coders/xwd.c24
-rw-r--r--coders/ycbcr.c32
-rw-r--r--coders/yuv.c78
77 files changed, 1214 insertions, 1214 deletions
diff --git a/coders/aai.c b/coders/aai.c
index 234e1437c..4e838b74b 100644
--- a/coders/aai.c
+++ b/coders/aai.c
@@ -172,12 +172,12 @@ static Image *ReadAAIImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -377,11 +377,11 @@ static MagickBooleanType WriteAAIImage(const ImageInfo *image_info,Image *image)
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++;
diff --git a/coders/avs.c b/coders/avs.c
index 11bd2abf7..1e0176409 100644
--- a/coders/avs.c
+++ b/coders/avs.c
@@ -172,10 +172,10 @@ static Image *ReadAVSImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -376,10 +376,10 @@ static MagickBooleanType WriteAVSImage(const ImageInfo *image_info,Image *image)
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);
diff --git a/coders/bgr.c b/coders/bgr.c
index 7e3f3c98b..d7244a24b 100644
--- a/coders/bgr.c
+++ b/coders/bgr.c
@@ -246,12 +246,12 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
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++;
}
@@ -332,27 +332,27 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
{
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:
@@ -423,7 +423,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
@@ -475,7 +475,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
@@ -527,7 +527,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
@@ -588,7 +588,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
@@ -675,7 +675,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
@@ -746,7 +746,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
@@ -817,7 +817,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
@@ -890,7 +890,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
diff --git a/coders/bmp.c b/coders/bmp.c
index 57e634b25..1681da48c 100644
--- a/coders/bmp.c
+++ b/coders/bmp.c
@@ -1010,7 +1010,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -1020,7 +1020,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -1052,15 +1052,15 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -1094,7 +1094,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
for (x = (ssize_t)image->columns; x != 0; --x)
{
index=ConstrainColormapIndex(image,*p);
- SetIndexPixelComponent(indexes,index);
+ SetPixelIndex(indexes,index);
indexes++;
p++;
q++;
@@ -1160,13 +1160,13 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -1197,10 +1197,10 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -1256,13 +1256,13 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -1655,7 +1655,7 @@ static MagickBooleanType WriteBMPImage(const ImageInfo *image_info,Image *image)
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)
{
@@ -1702,7 +1702,7 @@ static MagickBooleanType WriteBMPImage(const ImageInfo *image_info,Image *image)
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)
{
@@ -1741,7 +1741,7 @@ static MagickBooleanType WriteBMPImage(const ImageInfo *image_info,Image *image)
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)
@@ -1767,9 +1767,9 @@ static MagickBooleanType WriteBMPImage(const ImageInfo *image_info,Image *image)
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++)
@@ -1797,10 +1797,10 @@ static MagickBooleanType WriteBMPImage(const ImageInfo *image_info,Image *image)
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)
diff --git a/coders/braille.c b/coders/braille.c
index 7976d2787..be405b2a0 100644
--- a/coders/braille.c
+++ b/coders/braille.c
@@ -274,9 +274,9 @@ static MagickBooleanType WriteBRAILLEImage(const ImageInfo *image_info,
{
#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);
diff --git a/coders/clipboard.c b/coders/clipboard.c
index 40bfbbfa6..4b8bbae6f 100644
--- a/coders/clipboard.c
+++ b/coders/clipboard.c
@@ -213,10 +213,10 @@ static Image *ReadCLIPBOARDImage(const ImageInfo *image_info,
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++;
}
diff --git a/coders/cmyk.c b/coders/cmyk.c
index 50ad3bd7f..4ed1cef89 100644
--- a/coders/cmyk.c
+++ b/coders/cmyk.c
@@ -254,14 +254,14 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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++;
}
@@ -351,28 +351,28 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
{
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:
@@ -443,7 +443,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
@@ -495,7 +495,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
@@ -547,7 +547,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
@@ -607,7 +607,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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++;
@@ -663,7 +663,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
@@ -750,7 +750,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
@@ -821,7 +821,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
@@ -892,7 +892,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
@@ -971,7 +971,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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++;
@@ -1045,7 +1045,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
diff --git a/coders/cut.c b/coders/cut.c
index 6bbc56f64..7b5380262 100644
--- a/coders/cut.c
+++ b/coders/cut.c
@@ -117,7 +117,7 @@ static void InsertRow(ssize_t depth,unsigned char *p,ssize_t y,Image *image)
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++;
}
@@ -126,7 +126,7 @@ static void InsertRow(ssize_t depth,unsigned char *p,ssize_t y,Image *image)
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++;
}
@@ -143,29 +143,29 @@ static void InsertRow(ssize_t depth,unsigned char *p,ssize_t y,Image *image)
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++;
@@ -184,15 +184,15 @@ static void InsertRow(ssize_t depth,unsigned char *p,ssize_t y,Image *image)
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)
@@ -207,7 +207,7 @@ static void InsertRow(ssize_t depth,unsigned char *p,ssize_t y,Image *image)
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)
@@ -245,8 +245,8 @@ static int GetCutColors(Image *image)
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++;
@@ -573,11 +573,11 @@ static Image *ReadCUTImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
diff --git a/coders/dcm.c b/coders/dcm.c
index c67a0044c..c0529c20e 100644
--- a/coders/dcm.c
+++ b/coders/dcm.c
@@ -3729,25 +3729,25 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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;
}
@@ -3869,7 +3869,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
}
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;
@@ -3907,9 +3907,9 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -3999,8 +3999,8 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
}
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;
@@ -4039,11 +4039,11 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
diff --git a/coders/dds.c b/coders/dds.c
index 6e2115d68..298c527a0 100644
--- a/coders/dds.c
+++ b/coders/dds.c
@@ -546,10 +546,10 @@ static MagickBooleanType ReadDXT1(Image *image, DDSInfo *dds_info)
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;
@@ -631,9 +631,9 @@ static MagickBooleanType ReadDXT3(Image *image, DDSInfo *dds_info)
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
*/
@@ -641,7 +641,7 @@ static MagickBooleanType ReadDXT3(Image *image, DDSInfo *dds_info)
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++;
}
@@ -728,9 +728,9 @@ static MagickBooleanType ReadDXT5(Image *image, DDSInfo *dds_info)
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)
@@ -745,7 +745,7 @@ static MagickBooleanType ReadDXT5(Image *image, DDSInfo *dds_info)
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++;
}
@@ -783,11 +783,11 @@ static MagickBooleanType ReadUncompressedRGB(Image *image, DDSInfo *dds_info)
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);
@@ -824,13 +824,13 @@ static MagickBooleanType ReadUncompressedRGBA(Image *image, DDSInfo *dds_info)
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++;
}
diff --git a/coders/dib.c b/coders/dib.c
index 5bbda7e4d..918c9a94f 100644
--- a/coders/dib.c
+++ b/coders/dib.c
@@ -657,7 +657,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
for (bit=0; bit < 8; bit++)
{
index=(IndexPacket) ((*p) & (0x80 >> bit) ? 0x01 : 0x00);
- SetIndexPixelComponent(indexes+x+bit,index);
+ SetPixelIndex(indexes+x+bit,index);
}
p++;
}
@@ -666,7 +666,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -698,15 +698,15 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -740,7 +740,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
for (x=0; x < (ssize_t) image->columns; x++)
{
index=ConstrainColormapIndex(image,*p);
- SetIndexPixelComponent(indexes+x,index);
+ SetPixelIndex(indexes+x,index);
p++;
q++;
}
@@ -780,20 +780,20 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -824,11 +824,11 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -1087,7 +1087,7 @@ static MagickBooleanType WriteDIBImage(const ImageInfo *image_info,Image *image)
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)
{
@@ -1124,7 +1124,7 @@ static MagickBooleanType WriteDIBImage(const ImageInfo *image_info,Image *image)
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,
@@ -1150,10 +1150,10 @@ static MagickBooleanType WriteDIBImage(const ImageInfo *image_info,Image *image)
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);
@@ -1182,11 +1182,11 @@ static MagickBooleanType WriteDIBImage(const ImageInfo *image_info,Image *image)
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)
diff --git a/coders/djvu.c b/coders/djvu.c
index b8ccf3954..54a233006 100644
--- a/coders/djvu.c
+++ b/coders/djvu.c
@@ -407,7 +407,7 @@ get_page_image(LoadContext *lc, ddjvu_page_t *page, int x, int y, int w, int h,
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;
@@ -442,9 +442,9 @@ get_page_image(LoadContext *lc, ddjvu_page_t *page, int x, int y, int w, int h,
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++;
}
diff --git a/coders/dps.c b/coders/dps.c
index e1ec23f27..bead8ec17 100644
--- a/coders/dps.c
+++ b/coders/dps.c
@@ -382,11 +382,11 @@ static Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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)
@@ -405,14 +405,14 @@ static Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -455,7 +455,7 @@ static Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -501,9 +501,9 @@ static Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
diff --git a/coders/emf.c b/coders/emf.c
index b1afb2748..f4dfcce35 100644
--- a/coders/emf.c
+++ b/coders/emf.c
@@ -613,10 +613,10 @@ static Image *ReadEMFImage(const ImageInfo *image_info,
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++;
}
diff --git a/coders/exr.c b/coders/exr.c
index 73932216f..df9137e69 100644
--- a/coders/exr.c
+++ b/coders/exr.c
@@ -224,13 +224,13 @@ static Image *ReadEXRImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -431,16 +431,16 @@ static MagickBooleanType WriteEXRImage(const ImageInfo *image_info,Image *image)
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++;
diff --git a/coders/fits.c b/coders/fits.c
index 310365e6c..91201c178 100644
--- a/coders/fits.c
+++ b/coders/fits.c
@@ -443,10 +443,10 @@ static Image *ReadFITSImage(const ImageInfo *image_info,
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)
diff --git a/coders/fpx.c b/coders/fpx.c
index f7e863c1c..b0e896976 100644
--- a/coders/fpx.c
+++ b/coders/fpx.c
@@ -459,21 +459,21 @@ static Image *ReadFPXImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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;
diff --git a/coders/gif.c b/coders/gif.c
index 23c285ad7..7b803f0d4 100644
--- a/coders/gif.c
+++ b/coders/gif.c
@@ -445,9 +445,9 @@ static MagickBooleanType DecodeImage(Image *image,const ssize_t opacity)
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++;
@@ -674,7 +674,7 @@ static MagickBooleanType EncodeImage(const ImageInfo *image_info,Image *image,
/*
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)
diff --git a/coders/gray.c b/coders/gray.c
index 953238496..f73ed5e27 100644
--- a/coders/gray.c
+++ b/coders/gray.c
@@ -223,9 +223,9 @@ static Image *ReadGRAYImage(const ImageInfo *image_info,
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++;
}
diff --git a/coders/hald.c b/coders/hald.c
index 41eb89ec9..9fc5c6589 100644
--- a/coders/hald.c
+++ b/coders/hald.c
@@ -146,13 +146,13 @@ static Image *ReadHALDImage(const ImageInfo *image_info,
{
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++;
}
}
diff --git a/coders/hdr.c b/coders/hdr.c
index aeb5df030..16a79b4cd 100644
--- a/coders/hdr.c
+++ b/coders/hdr.c
@@ -462,15 +462,15 @@ static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -752,22 +752,22 @@ static MagickBooleanType WriteHDRImage(const ImageInfo *image_info,Image *image)
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))
diff --git a/coders/histogram.c b/coders/histogram.c
index 95ad0a3c4..71f8d81ed 100644
--- a/coders/histogram.c
+++ b/coders/histogram.c
@@ -271,11 +271,11 @@ static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info,
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++;
}
}
@@ -308,7 +308,7 @@ static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info,
r=q+y;
for ( ; y < (ssize_t) histogram_image->rows; y++)
{
- SetRedPixelComponent(r,QuantumRange);
+ SetPixelRed(r,QuantumRange);
r++;
}
}
@@ -318,7 +318,7 @@ static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info,
r=q+y;
for ( ; y < (ssize_t) histogram_image->rows; y++)
{
- SetGreenPixelComponent(r,QuantumRange);
+ SetPixelGreen(r,QuantumRange);
r++;
}
}
@@ -328,7 +328,7 @@ static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info,
r=q+y;
for ( ; y < (ssize_t) histogram_image->rows; y++)
{
- SetBluePixelComponent(r,QuantumRange);
+ SetPixelBlue(r,QuantumRange);
r++;
}
}
diff --git a/coders/hrz.c b/coders/hrz.c
index c8ea57dbf..13ab46fa5 100644
--- a/coders/hrz.c
+++ b/coders/hrz.c
@@ -156,10 +156,10 @@ static Image *ReadHRZImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -323,9 +323,9 @@ static MagickBooleanType WriteHRZImage(const ImageInfo *image_info,Image *image)
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);
diff --git a/coders/icon.c b/coders/icon.c
index 4cfd35d2b..ca636ff75 100644
--- a/coders/icon.c
+++ b/coders/icon.c
@@ -409,14 +409,14 @@ static Image *ReadICONImage(const ImageInfo *image_info,
{
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++)
@@ -447,13 +447,13 @@ static Image *ReadICONImage(const ImageInfo *image_info,
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);
@@ -483,7 +483,7 @@ static Image *ReadICONImage(const ImageInfo *image_info,
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);
@@ -514,7 +514,7 @@ static Image *ReadICONImage(const ImageInfo *image_info,
{
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);
@@ -543,14 +543,14 @@ static Image *ReadICONImage(const ImageInfo *image_info,
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++;
}
@@ -589,14 +589,14 @@ static Image *ReadICONImage(const ImageInfo *image_info,
{
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)
@@ -1000,7 +1000,7 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
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)
{
@@ -1041,7 +1041,7 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
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)
{
@@ -1074,7 +1074,7 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
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);
@@ -1098,13 +1098,13 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
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)
@@ -1192,7 +1192,7 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
{
byte<<=1;
if ((next->matte == MagickTrue) &&
- (GetOpacityPixelComponent(p) == (Quantum) TransparentOpacity))
+ (GetPixelOpacity(p) == (Quantum) TransparentOpacity))
byte|=0x01;
bit++;
if (bit == 8)
diff --git a/coders/jbig.c b/coders/jbig.c
index bdbd33db8..3610b08a5 100644
--- a/coders/jbig.c
+++ b/coders/jbig.c
@@ -237,8 +237,8 @@ static Image *ReadJBIGImage(const ImageInfo *image_info,
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)
diff --git a/coders/jp2.c b/coders/jp2.c
index a70d0913d..07073b57f 100644
--- a/coders/jp2.c
+++ b/coders/jp2.c
@@ -536,10 +536,10 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -552,13 +552,13 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -572,16 +572,16 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -936,14 +936,14 @@ static MagickBooleanType WriteJP2Image(const ImageInfo *image_info,Image *image)
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++;
}
diff --git a/coders/jpeg.c b/coders/jpeg.c
index 1996e6c00..34a318bd7 100644
--- a/coders/jpeg.c
+++ b/coders/jpeg.c
@@ -1245,8 +1245,8 @@ static Image *ReadJPEGImage(const ImageInfo *image_info,
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++;
}
@@ -1254,27 +1254,27 @@ static Image *ReadJPEGImage(const ImageInfo *image_info,
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++;
}
}
@@ -1283,8 +1283,8 @@ static Image *ReadJPEGImage(const ImageInfo *image_info,
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++;
}
@@ -1292,27 +1292,27 @@ static Image *ReadJPEGImage(const ImageInfo *image_info,
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)
@@ -2225,9 +2225,9 @@ static MagickBooleanType WriteJPEGImage(const ImageInfo *image_info,
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);
@@ -2284,13 +2284,13 @@ static MagickBooleanType WriteJPEGImage(const ImageInfo *image_info,
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);
@@ -2343,11 +2343,11 @@ static MagickBooleanType WriteJPEGImage(const ImageInfo *image_info,
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++;
}
@@ -2380,13 +2380,13 @@ static MagickBooleanType WriteJPEGImage(const ImageInfo *image_info,
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);
diff --git a/coders/mac.c b/coders/mac.c
index e21655db0..5d7761f5b 100644
--- a/coders/mac.c
+++ b/coders/mac.c
@@ -191,7 +191,7 @@ static Image *ReadMACImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
if (bit == 0)
byte=(*p++);
- SetIndexPixelComponent(indexes+x,((byte & 0x80) != 0 ?
+ SetPixelIndex(indexes+x,((byte & 0x80) != 0 ?
0x01 : 0x00));
bit++;
byte<<=1;
@@ -227,7 +227,7 @@ static Image *ReadMACImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
if (bit == 0)
byte=(*p++);
- SetIndexPixelComponent(indexes+x,((byte & 0x80) != 0 ?
+ SetPixelIndex(indexes+x,((byte & 0x80) != 0 ?
0x01 : 0x00));
bit++;
byte<<=1;
diff --git a/coders/map.c b/coders/map.c
index c745fe94f..11ef7a9fa 100644
--- a/coders/map.c
+++ b/coders/map.c
@@ -227,8 +227,8 @@ static Image *ReadMAPImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -426,8 +426,8 @@ static MagickBooleanType WriteMAPImage(const ImageInfo *image_info,Image *image)
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);
}
diff --git a/coders/mat.c b/coders/mat.c
index b48d32d16..c9c3217e4 100644
--- a/coders/mat.c
+++ b/coders/mat.c
@@ -197,38 +197,38 @@ static void InsertComplexDoubleRow(double *p, int y, Image * image, double MinVa
{
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++;
@@ -263,38 +263,38 @@ static void InsertComplexFloatRow(float *p, int y, Image * image, double MinVal,
{
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++;
@@ -424,9 +424,9 @@ static void FixSignedValues(PixelPacket *q, int y)
/* 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++;
}
}
diff --git a/coders/matte.c b/coders/matte.c
index a415208c4..cadddcb58 100644
--- a/coders/matte.c
+++ b/coders/matte.c
@@ -194,10 +194,10 @@ static MagickBooleanType WriteMATTEImage(const ImageInfo *image_info,
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++;
}
diff --git a/coders/miff.c b/coders/miff.c
index 2a068f1eb..1305b92ae 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -288,20 +288,20 @@ static void PushRunlengthPacket(Image *image,const unsigned char *pixels,
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;
}
@@ -311,24 +311,24 @@ static void PushRunlengthPacket(Image *image,const unsigned char *pixels,
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;
@@ -339,24 +339,24 @@ static void PushRunlengthPacket(Image *image,const unsigned char *pixels,
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;
@@ -1422,11 +1422,11 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
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;
@@ -2420,9 +2420,9 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
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
{
@@ -2432,7 +2432,7 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
}
pixel=(*p);
if (indexes != (IndexPacket *) NULL)
- index=GetIndexPixelComponent(indexes+x);
+ index=GetPixelIndex(indexes+x);
p++;
}
q=PopRunlengthPacket(image,q,length,pixel,index);
diff --git a/coders/mono.c b/coders/mono.c
index 5e7997275..3af6cbee1 100644
--- a/coders/mono.c
+++ b/coders/mono.c
@@ -167,9 +167,9 @@ static Image *ReadMONOImage(const ImageInfo *image_info,
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;
diff --git a/coders/mtv.c b/coders/mtv.c
index a8476cd92..dcc315618 100644
--- a/coders/mtv.c
+++ b/coders/mtv.c
@@ -174,10 +174,10 @@ static Image *ReadMTVImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -378,9 +378,9 @@ static MagickBooleanType WriteMTVImage(const ImageInfo *image_info,Image *image)
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);
diff --git a/coders/otb.c b/coders/otb.c
index 5739298f8..dd2402134 100644
--- a/coders/otb.c
+++ b/coders/otb.c
@@ -184,7 +184,7 @@ static Image *ReadOTBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
diff --git a/coders/palm.c b/coders/palm.c
index e639db288..d5ace14e8 100644
--- a/coders/palm.c
+++ b/coders/palm.c
@@ -192,9 +192,9 @@ static int FindColor(PixelPacket *pixel)
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);
}
@@ -475,13 +475,13 @@ static Image *ReadPALMImage(const ImageInfo *image_info,
{
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++;
}
}
@@ -493,8 +493,8 @@ static Image *ReadPALMImage(const ImageInfo *image_info,
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
@@ -829,8 +829,8 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
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);
}
@@ -858,16 +858,16 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
{
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);
@@ -882,9 +882,9 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
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)
diff --git a/coders/pcd.c b/coders/pcd.c
index 80134106d..92853de52 100644
--- a/coders/pcd.c
+++ b/coders/pcd.c
@@ -671,9 +671,9 @@ static Image *ReadPCDImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -779,9 +779,9 @@ static Image *ReadPCDImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -1024,7 +1024,7 @@ static MagickBooleanType WritePCDTile(Image *image,const char *page_geometry,
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,
@@ -1033,7 +1033,7 @@ static MagickBooleanType WritePCDTile(Image *image,const char *page_geometry,
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,
@@ -1042,7 +1042,7 @@ static MagickBooleanType WritePCDTile(Image *image,const char *page_geometry,
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);
diff --git a/coders/pcl.c b/coders/pcl.c
index 0607523c3..bbc51fefa 100644
--- a/coders/pcl.c
+++ b/coders/pcl.c
@@ -876,7 +876,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
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:
@@ -887,9 +887,9 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *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));
p++;
}
break;
diff --git a/coders/pcx.c b/coders/pcx.c
index e1971880d..e18dbb6c4 100644
--- a/coders/pcx.c
+++ b/coders/pcx.c
@@ -602,14 +602,14 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -1011,7 +1011,7 @@ static MagickBooleanType WritePCXImage(const ImageInfo *image_info,Image *image)
{
for (x=0; x < (ssize_t) pcx_info.bytes_per_line; x++)
{
- *q++=ScaleQuantumToChar(GetRedPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelRed(p));
p++;
}
break;
@@ -1020,7 +1020,7 @@ static MagickBooleanType WritePCXImage(const ImageInfo *image_info,Image *image)
{
for (x=0; x < (ssize_t) pcx_info.bytes_per_line; x++)
{
- *q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelGreen(p));
p++;
}
break;
@@ -1029,7 +1029,7 @@ static MagickBooleanType WritePCXImage(const ImageInfo *image_info,Image *image)
{
for (x=0; x < (ssize_t) pcx_info.bytes_per_line; x++)
{
- *q++=ScaleQuantumToChar(GetBluePixelComponent(p));
+ *q++=ScaleQuantumToChar(GetPixelBlue(p));
p++;
}
break;
@@ -1040,7 +1040,7 @@ static MagickBooleanType WritePCXImage(const ImageInfo *image_info,Image *image)
for (x=(ssize_t) pcx_info.bytes_per_line; x != 0; x--)
{
*q++=ScaleQuantumToChar((Quantum)
- (GetAlphaPixelComponent(p)));
+ (GetPixelAlpha(p)));
p++;
}
break;
@@ -1069,7 +1069,7 @@ static MagickBooleanType WritePCXImage(const ImageInfo *image_info,Image *image)
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)
@@ -1111,7 +1111,7 @@ static MagickBooleanType WritePCXImage(const ImageInfo *image_info,Image *image)
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)
diff --git a/coders/pdb.c b/coders/pdb.c
index c3bea820d..90e892615 100644
--- a/coders/pdb.c
+++ b/coders/pdb.c
@@ -443,7 +443,7 @@ static Image *ReadPDBImage(const ImageInfo *image_info,ExceptionInfo *exception)
for (bit=0; bit < 8; bit++)
{
index=(IndexPacket) (*p & (0x80 >> bit) ? 0x00 : 0x01);
- SetIndexPixelComponent(indexes+x+bit,index);
+ SetPixelIndex(indexes+x+bit,index);
}
p++;
}
@@ -471,13 +471,13 @@ static Image *ReadPDBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -504,9 +504,9 @@ static Image *ReadPDBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
diff --git a/coders/pdf.c b/coders/pdf.c
index 1326f4da7..7c543ec27 100644
--- a/coders/pdf.c
+++ b/coders/pdf.c
@@ -1708,11 +1708,11 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
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)
@@ -1755,14 +1755,14 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
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)
@@ -1808,7 +1808,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
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,
@@ -1849,7 +1849,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
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,
@@ -2151,11 +2151,11 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
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++;
}
}
@@ -2192,14 +2192,14 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
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++;
}
}
@@ -2241,7 +2241,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
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)
@@ -2275,7 +2275,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
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;
@@ -2440,7 +2440,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- *q++=ScaleQuantumToChar((Quantum) (GetAlphaPixelComponent(p)));
+ *q++=ScaleQuantumToChar((Quantum) (GetPixelAlpha(p)));
p++;
}
}
@@ -2475,7 +2475,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
for (x=0; x < (ssize_t) image->columns; x++)
{
Ascii85Encode(image,ScaleQuantumToChar((Quantum) (QuantumRange-
- GetOpacityPixelComponent(p))));
+ GetPixelOpacity(p))));
p++;
}
}
diff --git a/coders/pict.c b/coders/pict.c
index 9b857cd1c..f113fcd40 100644
--- a/coders/pict.c
+++ b/coders/pict.c
@@ -1174,12 +1174,12 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
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
@@ -1188,12 +1188,12 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
{
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
@@ -1202,10 +1202,10 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
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
@@ -1213,12 +1213,12 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
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)));
}
}
@@ -1885,7 +1885,7 @@ static MagickBooleanType WritePICTImage(const ImageInfo *image_info,
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)
@@ -1933,12 +1933,12 @@ static MagickBooleanType WritePICTImage(const ImageInfo *image_info,
}
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,
diff --git a/coders/pix.c b/coders/pix.c
index f0f849146..2a76caa32 100644
--- a/coders/pix.c
+++ b/coders/pix.c
@@ -189,10 +189,10 @@ static Image *ReadPIXImage(const ImageInfo *image_info,ExceptionInfo *exception)
}
}
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++;
}
diff --git a/coders/plasma.c b/coders/plasma.c
index afecebd21..6f69a938b 100644
--- a/coders/plasma.c
+++ b/coders/plasma.c
@@ -114,11 +114,11 @@ static inline void PlasmaPixel(Image *image,RandomInfo *random_info,double x,
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);
}
@@ -173,7 +173,7 @@ static Image *ReadPlasmaImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,QuantumRange/2);
+ SetPixelOpacity(q,QuantumRange/2);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
diff --git a/coders/png.c b/coders/png.c
index b64b632b6..9def5aa8f 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -162,33 +162,33 @@
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 */
@@ -231,46 +231,46 @@
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
@@ -302,33 +302,33 @@
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 */
@@ -367,46 +367,46 @@
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)); \
}
@@ -446,46 +446,46 @@
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)); \
}
@@ -525,46 +525,46 @@
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)); \
}
/*
@@ -1010,9 +1010,9 @@ LosslessReduceDepthOK(Image *image)
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)
@@ -2914,7 +2914,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
{
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(),
@@ -2925,11 +2925,11 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
}
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)
@@ -3070,9 +3070,9 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
* 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++;
}
@@ -3107,8 +3107,8 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
{
quantum=((*p++) << 8);
quantum|=(*p++);
- SetAlphaPixelComponent(q,quantum);
- if (GetOpacityPixelComponent(q) != OpaqueOpacity)
+ SetPixelAlpha(q,quantum);
+ if (GetPixelOpacity(q) != OpaqueOpacity)
found_transparent_pixel = MagickTrue;
q++;
}
@@ -3132,9 +3132,9 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
{
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++;
@@ -3146,8 +3146,8 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
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++;
@@ -3169,7 +3169,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
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;
@@ -3302,20 +3302,20 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
*/
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
@@ -4377,14 +4377,14 @@ static Image *ReadOneJNGImage(MngInfo *mng_info,
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;
}
@@ -6207,14 +6207,14 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -6322,55 +6322,55 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
}
}
@@ -6380,22 +6380,22 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
/* 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++;
@@ -6463,47 +6463,47 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -6511,13 +6511,13 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
/* 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);
}
}
}
@@ -6527,22 +6527,22 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
/* 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++;
@@ -6566,14 +6566,14 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -7648,7 +7648,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
for (x=0; x < (ssize_t) image->columns; x++)
{
- LBR16RGBOPixelComponent(r);
+ LBR16PixelRGBO(r);
r++;
}
@@ -7682,7 +7682,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
for (x=0; x < (ssize_t) image->columns; x++)
{
- LBR08RGBOPixelComponent(r);
+ LBR08PixelRGBO(r);
r++;
}
@@ -7715,7 +7715,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
for (x=0; x < (ssize_t) image->columns; x++)
{
- LBR04RGBOPixelComponent(r);
+ LBR04PixelRGBO(r);
r++;
}
@@ -7747,7 +7747,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
for (x=0; x < (ssize_t) image->columns; x++)
{
- LBR02RGBOPixelComponent(r);
+ LBR02PixelRGBO(r);
r++;
}
@@ -7778,7 +7778,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
for (x=0; x < (ssize_t) image->columns; x++)
{
- LBR01RGBOPixelComponent(r);
+ LBR01PixelRGBO(r);
r++;
}
@@ -7949,13 +7949,13 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
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;
}
@@ -7970,7 +7970,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
number_opaque < 259)
{
number_opaque++;
- GetRGBPixelComponents(q, opaque+i);
+ GetPixelRGB(q, opaque+i);
opaque[i].opacity=OpaqueOpacity;
}
}
@@ -7981,15 +7981,15 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
{
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;
}
@@ -8003,7 +8003,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
number_transparent < 259)
{
number_transparent++;
- GetRGBOPixelComponents(q, transparent+i);
+ GetPixelRGBO(q, transparent+i);
}
}
}
@@ -8013,14 +8013,14 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
{
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;
}
@@ -8029,7 +8029,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
number_semitransparent < 259)
{
number_semitransparent++;
- GetRGBOPixelComponents(q, semitransparent+i);
+ GetPixelRGBO(q, semitransparent+i);
}
}
}
@@ -8119,8 +8119,8 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
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;
@@ -8135,8 +8135,8 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
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;
}
@@ -8254,15 +8254,15 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
{
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;
}
}
@@ -8371,13 +8371,13 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
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++;
}
@@ -8425,8 +8425,8 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(r) == OpaqueOpacity)
- LBR04RGBPixelComponent(r);
+ if (GetPixelOpacity(r) == OpaqueOpacity)
+ LBR04PixelRGB(r);
r++;
}
@@ -8476,8 +8476,8 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(r) == OpaqueOpacity)
- LBR03RGBPixelComponent(r);
+ if (GetPixelOpacity(r) == OpaqueOpacity)
+ LBR03PixelRGB(r);
r++;
}
@@ -8530,8 +8530,8 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetOpacityPixelComponent(r) == OpaqueOpacity)
- LBR02BluePixelComponent(r);
+ if (GetPixelOpacity(r) == OpaqueOpacity)
+ LBR02PixelBlue(r);
r++;
}
@@ -8581,12 +8581,12 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
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++;
}
@@ -8670,11 +8670,11 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
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;
diff --git a/coders/pnm.c b/coders/pnm.c
index 3182e56dd..166c9d52e 100644
--- a/coders/pnm.c
+++ b/coders/pnm.c
@@ -434,9 +434,9 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -487,12 +487,12 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -556,9 +556,9 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -720,9 +720,9 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
}
@@ -734,9 +734,9 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
}
@@ -819,9 +819,9 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -834,12 +834,12 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
}
@@ -852,12 +852,12 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
}
@@ -869,12 +869,12 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
}
@@ -1012,14 +1012,14 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -1033,14 +1033,14 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -1059,19 +1059,19 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -1085,19 +1085,19 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -1115,16 +1115,16 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -1138,16 +1138,16 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -1758,14 +1758,14 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
{
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;
@@ -1872,9 +1872,9 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
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++;
@@ -1887,9 +1887,9 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
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++;
@@ -1949,22 +1949,22 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
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++;
}
@@ -2031,7 +2031,7 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
if (image->matte != MagickFalse)
{
pixel=(unsigned char) ScaleQuantumToAny(
- GetOpacityPixelComponent(p),range);
+ GetPixelOpacity(p),range);
q=PopCharPixel((unsigned char) pixel,q);
}
p++;
@@ -2044,7 +2044,7 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
if (image->matte != MagickFalse)
{
pixel=(unsigned char) ScaleQuantumToAny(
- GetOpacityPixelComponent(p),range);
+ GetPixelOpacity(p),range);
q=PopShortPixel(MSBEndian,(unsigned short) pixel,q);
}
p++;
@@ -2057,19 +2057,19 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
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++;
@@ -2077,19 +2077,19 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
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++;
@@ -2101,16 +2101,16 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
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++;
@@ -2118,16 +2118,16 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
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++;
diff --git a/coders/ps.c b/coders/ps.c
index 9bd3d5896..d62f42742 100644
--- a/coders/ps.c
+++ b/coders/ps.c
@@ -1026,7 +1026,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
#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); \
@@ -1888,10 +1888,10 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
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
@@ -1949,7 +1949,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
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);
@@ -1958,11 +1958,11 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
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)
{
@@ -2029,11 +2029,11 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
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
@@ -2053,11 +2053,11 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
}
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);
@@ -2094,7 +2094,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
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)
{
diff --git a/coders/ps2.c b/coders/ps2.c
index 27471fc12..6731b7fa0 100644
--- a/coders/ps2.c
+++ b/coders/ps2.c
@@ -884,7 +884,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
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);
@@ -893,16 +893,16 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
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++;
@@ -941,7 +941,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
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));
@@ -954,22 +954,22 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
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++;
}
@@ -1035,7 +1035,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
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)
@@ -1068,7 +1068,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
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);
diff --git a/coders/ps3.c b/coders/ps3.c
index f8a717be8..6d5cb7f35 100644
--- a/coders/ps3.c
+++ b/coders/ps3.c
@@ -271,18 +271,18 @@ static MagickBooleanType SerializeImage(const ImageInfo *image_info,
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)
@@ -413,7 +413,7 @@ static MagickBooleanType SerializeImageIndexes(const ImageInfo *image_info,
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,
diff --git a/coders/psd.c b/coders/psd.c
index 892a9d2b2..e22ef6836 100644
--- a/coders/psd.c
+++ b/coders/psd.c
@@ -636,25 +636,25 @@ static MagickBooleanType ReadPSDLayer(Image *image,const size_t channels,
{
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
@@ -666,10 +666,10 @@ static MagickBooleanType ReadPSDLayer(Image *image,const size_t channels,
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++;
}
@@ -682,32 +682,32 @@ static MagickBooleanType ReadPSDLayer(Image *image,const size_t channels,
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:
diff --git a/coders/raw.c b/coders/raw.c
index 803e1fd2d..092dc4523 100644
--- a/coders/raw.c
+++ b/coders/raw.c
@@ -221,9 +221,9 @@ static Image *ReadRAWImage(const ImageInfo *image_info,
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++;
}
diff --git a/coders/rgb.c b/coders/rgb.c
index 87ae3c124..dafeca558 100644
--- a/coders/rgb.c
+++ b/coders/rgb.c
@@ -251,12 +251,12 @@ static Image *ReadRGBImage(const ImageInfo *image_info,
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++;
}
@@ -339,27 +339,27 @@ static Image *ReadRGBImage(const ImageInfo *image_info,
{
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:
@@ -430,7 +430,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
@@ -482,7 +482,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
@@ -534,7 +534,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
@@ -595,7 +595,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
@@ -682,7 +682,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
@@ -753,7 +753,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
@@ -824,7 +824,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
@@ -897,7 +897,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
diff --git a/coders/rla.c b/coders/rla.c
index d9505716b..39b80ba23 100644
--- a/coders/rla.c
+++ b/coders/rla.c
@@ -304,23 +304,23 @@ static Image *ReadRLAImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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;
}
}
@@ -344,23 +344,23 @@ static Image *ReadRLAImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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;
}
}
diff --git a/coders/rle.c b/coders/rle.c
index 08d165bae..14a49fb61 100644
--- a/coders/rle.c
+++ b/coders/rle.c
@@ -444,11 +444,11 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -504,7 +504,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -529,10 +529,10 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
diff --git a/coders/scr.c b/coders/scr.c
index 1acb4f954..13f19b474 100644
--- a/coders/scr.c
+++ b/coders/scr.c
@@ -215,18 +215,18 @@ static Image *ReadSCRImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)]));
}
diff --git a/coders/sct.c b/coders/sct.c
index dc75600af..5bed1d293 100644
--- a/coders/sct.c
+++ b/coders/sct.c
@@ -243,25 +243,25 @@ static Image *ReadSCTImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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;
}
}
diff --git a/coders/sgi.c b/coders/sgi.c
index da85fdbae..5d6c0543c 100644
--- a/coders/sgi.c
+++ b/coders/sgi.c
@@ -551,15 +551,15 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
@@ -584,12 +584,12 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -627,7 +627,7 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
quantum=(*p << 8);
quantum|=(*(p+1));
- SetIndexPixelComponent(indexes+x,quantum);
+ SetPixelIndex(indexes+x,quantum);
p+=8;
q++;
}
@@ -652,7 +652,7 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
indexes=GetAuthenticIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetIndexPixelComponent(indexes+x,*p);
+ SetPixelIndex(indexes+x,*p);
p+=4;
q++;
}
@@ -984,10 +984,10 @@ static MagickBooleanType WriteSGIImage(const ImageInfo *image_info,Image *image)
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
@@ -998,10 +998,10 @@ static MagickBooleanType WriteSGIImage(const ImageInfo *image_info,Image *image)
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)
diff --git a/coders/stegano.c b/coders/stegano.c
index 8ced90402..e0f7d79d0 100644
--- a/coders/stegano.c
+++ b/coders/stegano.c
@@ -100,9 +100,9 @@ static Image *ReadSTEGANOImage(const ImageInfo *image_info,
{
#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,
diff --git a/coders/sun.c b/coders/sun.c
index 901f222f0..3a066c03a 100644
--- a/coders/sun.c
+++ b/coders/sun.c
@@ -447,14 +447,14 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -485,7 +485,7 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -521,27 +521,27 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -852,10 +852,10 @@ static MagickBooleanType WriteSUNImage(const ImageInfo *image_info,Image *image)
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)
@@ -944,7 +944,7 @@ static MagickBooleanType WriteSUNImage(const ImageInfo *image_info,Image *image)
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)
diff --git a/coders/svg.c b/coders/svg.c
index 22959b8c4..ca4002882 100644
--- a/coders/svg.c
+++ b/coders/svg.c
@@ -3345,11 +3345,11 @@ static MagickBooleanType TraceSVGImage(Image *image)
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++;
}
diff --git a/coders/tga.c b/coders/tga.c
index f963b88a4..fe50b8c51 100644
--- a/coders/tga.c
+++ b/coders/tga.c
@@ -441,12 +441,12 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -784,20 +784,20 @@ static MagickBooleanType WriteTGAImage(const ImageInfo *image_info,Image *image)
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++;
}
diff --git a/coders/tiff.c b/coders/tiff.c
index 8e41dcb4b..409079bdd 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -1402,14 +1402,14 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
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++;
@@ -1497,13 +1497,13 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
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++;
@@ -1511,11 +1511,11 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
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++;
@@ -1583,14 +1583,14 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
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--;
diff --git a/coders/tim.c b/coders/tim.c
index 2a3b2247b..03fde8ac0 100644
--- a/coders/tim.c
+++ b/coders/tim.c
@@ -264,13 +264,13 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -298,7 +298,7 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -326,11 +326,11 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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++;
}
@@ -359,9 +359,9 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
diff --git a/coders/txt.c b/coders/txt.c
index 612633323..02082c782 100644
--- a/coders/txt.c
+++ b/coders/txt.c
@@ -476,17 +476,17 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
}
diff --git a/coders/uil.c b/coders/uil.c
index bbc64f892..15db2fc16 100644
--- a/coders/uil.c
+++ b/coders/uil.c
@@ -248,7 +248,7 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image)
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;
@@ -277,7 +277,7 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image)
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++;
}
}
@@ -355,11 +355,11 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image)
(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';
diff --git a/coders/uyvy.c b/coders/uyvy.c
index 0bd1ff4c2..74be2507d 100644
--- a/coders/uyvy.c
+++ b/coders/uyvy.c
@@ -158,13 +158,13 @@ static Image *ReadUYVYImage(const ImageInfo *image_info,
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)
@@ -338,17 +338,17 @@ static MagickBooleanType WriteUYVYImage(const ImageInfo *image_info,
{
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++;
}
diff --git a/coders/viff.c b/coders/viff.c
index fe1c56723..8a32d077d 100644
--- a/coders/viff.c
+++ b/coders/viff.c
@@ -628,9 +628,9 @@ static Image *ReadVIFFImage(const ImageInfo *image_info,
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++;
}
@@ -639,9 +639,9 @@ static Image *ReadVIFFImage(const ImageInfo *image_info,
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++;
}
@@ -665,7 +665,7 @@ static Image *ReadVIFFImage(const ImageInfo *image_info,
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)
@@ -689,19 +689,19 @@ static Image *ReadVIFFImage(const ImageInfo *image_info,
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++;
@@ -1097,12 +1097,12 @@ static MagickBooleanType WriteVIFFImage(const ImageInfo *image_info,
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++;
}
@@ -1148,7 +1148,7 @@ static MagickBooleanType WriteVIFFImage(const ImageInfo *image_info,
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,
diff --git a/coders/wbmp.c b/coders/wbmp.c
index 23ff0b20c..4925b04c5 100644
--- a/coders/wbmp.c
+++ b/coders/wbmp.c
@@ -201,7 +201,7 @@ static Image *ReadWBMPImage(const ImageInfo *image_info,
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;
diff --git a/coders/webp.c b/coders/webp.c
index 8bb52bafe..e45b6dbc1 100644
--- a/coders/webp.c
+++ b/coders/webp.c
@@ -170,10 +170,10 @@ static Image *ReadWEBPImage(const ImageInfo *image_info,
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++;
@@ -371,12 +371,12 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info,
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++;
}
diff --git a/coders/wpg.c b/coders/wpg.c
index 28ee1bd00..fb870b2c9 100644
--- a/coders/wpg.c
+++ b/coders/wpg.c
@@ -296,8 +296,8 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp)
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++;
@@ -307,8 +307,8 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp)
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++;
@@ -326,42 +326,42 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp)
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++;
}
}
@@ -381,20 +381,20 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp)
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++;
}
@@ -411,8 +411,8 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp)
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++;
}
@@ -427,9 +427,9 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp)
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))
diff --git a/coders/xbm.c b/coders/xbm.c
index b7ef7303b..4c7c673a8 100644
--- a/coders/xbm.c
+++ b/coders/xbm.c
@@ -363,7 +363,7 @@ static Image *ReadXBMImage(const ImageInfo *image_info,ExceptionInfo *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)
diff --git a/coders/xc.c b/coders/xc.c
index 5f748dfa5..9dea59a0f 100644
--- a/coders/xc.c
+++ b/coders/xc.c
@@ -152,7 +152,7 @@ static Image *ReadXCImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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;
diff --git a/coders/xcf.c b/coders/xcf.c
index f34483245..b77f10b92 100644
--- a/coders/xcf.c
+++ b/coders/xcf.c
@@ -374,10 +374,10 @@ static MagickBooleanType load_tile(Image *image,Image *tile_image,
{
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++;
@@ -388,10 +388,10 @@ static MagickBooleanType load_tile(Image *image,Image *tile_image,
{
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++;
@@ -474,36 +474,36 @@ static MagickBooleanType load_tile_rle(Image *image,Image *tile_image,
{
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;
}
@@ -534,36 +534,36 @@ static MagickBooleanType load_tile_rle(Image *image,Image *tile_image,
{
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;
}
diff --git a/coders/xpm.c b/coders/xpm.c
index caad028d7..6b10e0050 100644
--- a/coders/xpm.c
+++ b/coders/xpm.c
@@ -406,7 +406,7 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception)
(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;
@@ -687,7 +687,7 @@ static MagickBooleanType WritePICONImage(const ImageInfo *image_info,
if (q->opacity == (Quantum) TransparentOpacity)
transparent=MagickTrue;
else
- SetOpacityPixelComponent(q,OpaqueOpacity);
+ SetPixelOpacity(q,OpaqueOpacity);
q++;
}
if (SyncAuthenticPixels(picon,exception) == MagickFalse)
@@ -716,7 +716,7 @@ static MagickBooleanType WritePICONImage(const ImageInfo *image_info,
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)
@@ -787,11 +787,11 @@ static MagickBooleanType WritePICONImage(const ImageInfo *image_info,
(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';
@@ -1018,11 +1018,11 @@ static MagickBooleanType WriteXPMImage(const ImageInfo *image_info,Image *image)
(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';
diff --git a/coders/xwd.c b/coders/xwd.c
index f28c21ee1..6b276f6af 100644
--- a/coders/xwd.c
+++ b/coders/xwd.c
@@ -405,13 +405,13 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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++;
}
@@ -433,15 +433,15 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -477,8 +477,8 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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)
@@ -769,14 +769,14 @@ static MagickBooleanType WriteXWDImage(const ImageInfo *image_info,Image *image)
{
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++)
diff --git a/coders/ycbcr.c b/coders/ycbcr.c
index c596d24a9..d73c28879 100644
--- a/coders/ycbcr.c
+++ b/coders/ycbcr.c
@@ -244,11 +244,11 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
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++;
}
@@ -320,22 +320,22 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
{
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:
@@ -397,7 +397,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
@@ -440,7 +440,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
@@ -483,7 +483,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
@@ -529,7 +529,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
@@ -607,7 +607,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetRedPixelComponent(q,GetRedPixelComponent(p));
+ SetPixelRed(q,GetPixelRed(p));
p++;
q++;
}
@@ -669,7 +669,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetGreenPixelComponent(q,GetGreenPixelComponent(p));
+ SetPixelGreen(q,GetPixelGreen(p));
p++;
q++;
}
@@ -731,7 +731,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetBluePixelComponent(q,GetBluePixelComponent(p));
+ SetPixelBlue(q,GetPixelBlue(p));
p++;
q++;
}
@@ -796,7 +796,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetOpacityPixelComponent(q,GetOpacityPixelComponent(p));
+ SetPixelOpacity(q,GetPixelOpacity(p));
p++;
q++;
}
diff --git a/coders/yuv.c b/coders/yuv.c
index 7d1a3b1db..35945be92 100644
--- a/coders/yuv.c
+++ b/coders/yuv.c
@@ -238,41 +238,41 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
}
@@ -291,15 +291,15 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
}
@@ -339,16 +339,16 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -376,10 +376,10 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
}
@@ -407,8 +407,8 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++;
}
@@ -672,26 +672,26 @@ static MagickBooleanType WriteYUVImage(const ImageInfo *image_info,Image *image)
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++;
@@ -722,10 +722,10 @@ static MagickBooleanType WriteYUVImage(const ImageInfo *image_info,Image *image)
{
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)
@@ -765,10 +765,10 @@ static MagickBooleanType WriteYUVImage(const ImageInfo *image_info,Image *image)
{
if (quantum == 1)
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
else
(void) WriteBlobShort(image,ScaleQuantumToShort(
- GetGreenPixelComponent(p)));
+ GetPixelGreen(p)));
p++;
}
}
@@ -800,10 +800,10 @@ static MagickBooleanType WriteYUVImage(const ImageInfo *image_info,Image *image)
{
if (quantum == 1)
(void) WriteBlobByte(image,ScaleQuantumToChar(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
else
(void) WriteBlobShort(image,ScaleQuantumToShort(
- GetBluePixelComponent(p)));
+ GetPixelBlue(p)));
p++;
}
}