break;
index=ConstrainColormapIndex(image,(size_t) c);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
SetOpacityPixelComponent(q,(ssize_t) index == opacity ?
TransparentOpacity : OpaqueOpacity);
x++;
if (bit == 8)
bit=0;
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
pixel=(size_t) ((GETJSAMPLE(*p) ^ 0x80) << 4);
index=ConstrainColormapIndex(image,pixel);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(int) index].red);
- SetGreenPixelComponent(q,image->colormap[(int) index].green);
- SetBluePixelComponent(q,image->colormap[(int) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
p++;
q++;
}
{
index=ConstrainColormapIndex(image,(size_t) GETJSAMPLE(*p));
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(int) index].red);
- SetGreenPixelComponent(q,image->colormap[(int) index].green);
- SetBluePixelComponent(q,image->colormap[(int) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
p++;
q++;
}
p++;
}
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
ThrowReaderException(CorruptImageError,"CorruptImage");
index=(IndexPacket) (mask-(((*ptr) & (mask << bit)) >> bit));
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
if (bit)
bit-=bits_per_pixel;
else
SetIndexPixelComponent(indexes+x,ScaleQuantumToChar(pixel));
else
SetIndexPixelComponent(indexes+x,ScaleQuantumToShort(pixel));
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
if (image->depth == 1)
{
ssize_t
{
SetIndexPixelComponent(indexes+x,(((unsigned char) pixel) &
(0x01 << (7-bit))) != 0 ? 0 : 255);
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
q++;
x++;
}
{
index=((*p) & (0x80 >> bit) ? 0x01 : 0x00);
SetIndexPixelComponent(indexes+x+bit,index);
- SetRedPixelComponent(q,image->colormap[(int) index].red);
- SetGreenPixelComponent(q,image->colormap[(int) index].green);
- SetBluePixelComponent(q,image->colormap[(int) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
}
p++;
{
index=((*p) & (0x80 >> bit) ? 0x01 : 0x00);
SetIndexPixelComponent(indexes+x+bit,index);
- SetRedPixelComponent(q,image->colormap[(int) index].red);
- SetGreenPixelComponent(q,image->colormap[(int) index].green);
- SetBluePixelComponent(q,image->colormap[(int) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
}
p++;
{
index=ConstrainColormapIndex(image,(*p >> 6) & 0x3);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
index=ConstrainColormapIndex(image,(*p >> 4) & 0x3);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
index=ConstrainColormapIndex(image,(*p >> 2) & 0x3);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
index=ConstrainColormapIndex(image,(*p) & 0x3);
SetIndexPixelComponent(indexes+x+1,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
p++;
q++;
}
{
index=ConstrainColormapIndex(image,(*p >> 6) & 0x3);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
if ((image->columns % 4) >= 1)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x3);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
if ((image->columns % 4) >= 2)
{
index=ConstrainColormapIndex(image,(*p >> 2) & 0x3);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
}
}
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
index=ConstrainColormapIndex(image,(*p) & 0x0f);
SetIndexPixelComponent(indexes+x+1,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
p++;
q++;
}
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
p++;
q++;
}
{
index=ConstrainColormapIndex(image,*p);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
p++;
q++;
}
index=ConstrainColormapIndex(image,XGetPixel(ximage,(int) x,
(int) y));
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
if (index < 0)
index+=(ssize_t) image->colors;
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[index].red);
- SetGreenPixelComponent(q,image->colormap[index].green);
- SetBluePixelComponent(q,image->colormap[index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
{
index=(IndexPacket) pixels[(ssize_t) GetIndexPixelComponent(indexes+x)];
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
status=MagickFalse;
{
index=(IndexPacket) (*p++);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
break;
threshold=(MagickRealType) QuantumRange*o4[(x%4)+4*(y%4)];
index=(IndexPacket) (intensity <= threshold ? 0 : 1);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
}
}
index=(IndexPacket) ((MagickRealType) PixelIntensityToQuantum(q) <=
threshold ? 0 : 1);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
}
if (!SyncAuthenticPixels(image,&image->exception))
SetIndexPixelComponent(indexes+x+i,index);
if (cube.quantize_info->measure_error == MagickFalse)
{
- SetRedPixelComponent(q,image->colormap[index].red);
- SetGreenPixelComponent(q,image->colormap[index].green);
- SetBluePixelComponent(q,image->colormap[index].blue);
+ SetRGBPixelComponent(q,image->colormap+index);
if (cube.associate_alpha != MagickFalse)
SetOpacityPixelComponent(q,image->colormap[index].opacity);
}
SetIndexPixelComponent(indexes+u,index);
if (cube.quantize_info->measure_error == MagickFalse)
{
- SetRedPixelComponent(q+u,image->colormap[index].red);
- SetGreenPixelComponent(q+u,image->colormap[index].green);
- SetBluePixelComponent(q+u,image->colormap[index].blue);
+ SetRGBPixelComponent(q,image->colormap+index);
if (cube.associate_alpha != MagickFalse)
SetOpacityPixelComponent(q+u,image->colormap[index].opacity);
}
*indexes=(IndexPacket) index;
if (cube_info->quantize_info->measure_error == MagickFalse)
{
- SetRedPixelComponent(q,image->colormap[index].red);
- SetGreenPixelComponent(q,image->colormap[index].green);
- SetBluePixelComponent(q,image->colormap[index].blue);
+ SetRGBPixelComponent(q,image->colormap+index);
if (cube_info->associate_alpha != MagickFalse)
SetOpacityPixelComponent(q,image->colormap[index].opacity);
}
0x00 : 0x01);
SetIndexPixelComponent(indexes+x+bit,PushColormapIndex(image,
pixel,&range_exception));
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x+bit)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x+bit)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x+bit)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x+bit));
q++;
}
p++;
0x00 : 0x01);
SetIndexPixelComponent(indexes+x+bit,PushColormapIndex(image,pixel,
&range_exception));
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x+bit)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x+bit)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x+bit)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x+bit));
q++;
}
break;
pixel=(unsigned char) ((*p >> 4) & 0xf);
SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
q++;
pixel=(unsigned char) ((*p) & 0xf);
SetIndexPixelComponent(indexes+x+1,PushColormapIndex(image,pixel,
pixel=(unsigned char) ((*p++ >> 4) & 0xf);
SetIndexPixelComponent(indexes+x+bit,PushColormapIndex(image,pixel,
&range_exception));
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x+bit)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x+bit)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x+bit)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x+bit));
q++;
}
break;
p=PushCharPixel(p,&pixel);
SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
p+=quantum_info->pad;
q++;
}
SetIndexPixelComponent(indexes+x,PushColormapIndex(image,
ClampToQuantum((MagickRealType) QuantumRange*
HalfToSinglePrecision(pixel)),&range_exception));
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
p+=quantum_info->pad;
q++;
}
p=PushShortPixel(endian,p,&pixel);
SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
p+=quantum_info->pad;
q++;
}
p=PushFloatPixel(&quantum_state,p,&pixel);
SetIndexPixelComponent(indexes+x,PushColormapIndex(image,
ClampToQuantum(pixel),&range_exception));
- *q=image->colormap[(ssize_t) GetIndexPixelComponent(indexes+x)];
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
p+=quantum_info->pad;
q++;
}
p=PushLongPixel(endian,p,&pixel);
SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- *q=image->colormap[(ssize_t) GetIndexPixelComponent(indexes+x)];
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
p+=quantum_info->pad;
q++;
}
p=PushDoublePixel(&quantum_state,p,&pixel);
SetIndexPixelComponent(indexes+x,PushColormapIndex(image,
ClampToQuantum(pixel),&range_exception));
- *q=image->colormap[(ssize_t) GetIndexPixelComponent(indexes+x)];
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
p+=quantum_info->pad;
q++;
}
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel,
&range_exception));
- *q=image->colormap[(ssize_t) GetIndexPixelComponent(indexes+x)];
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
p+=quantum_info->pad;
q++;
}
GetPseudoRandomValue(random_info[id]));
index=(IndexPacket) (intensity <= threshold.index ? 0 : 1);
SetIndexPixelComponent(indexes+x,index);
- SetRedPixelComponent(q,image->colormap[(ssize_t) index].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t) index].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t) index].blue);
+ SetRGBOPixelComponent(q,image->colormap+index);
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);