register unsigned int
bytes_per_pixel;
- unsigned char
- channel[sizeof(size_t)];
-
/*
Convert to multi-byte color-mapped X canvas.
*/
pixel=pixels[(ssize_t) GetPixelIndex(canvas,p)];
for (k=0; k < (int) bytes_per_pixel; k++)
{
- channel[k]=(unsigned char) pixel;
+ *q++=(unsigned char) (pixel & 0xff);
pixel>>=8;
}
- for (k=0; k < (int) bytes_per_pixel; k++)
- *q++=channel[k];
p+=GetPixelChannels(canvas);
}
q+=scanline_pad;
register unsigned int
bytes_per_pixel;
- unsigned char
- channel[sizeof(size_t)];
-
/*
Convert to multi-byte continuous-tone X canvas.
*/
- (void) ResetMagickMemory(channel,0,sizeof(channel));
bytes_per_pixel=(unsigned int) (ximage->bits_per_pixel >> 3);
for (y=0; y < (int) canvas->rows; y++)
{
pixel=XGammaPixel(canvas,map_info,p);
for (k=0; k < (int) bytes_per_pixel; k++)
{
- channel[k]=(unsigned char) pixel;
+ *q++=(unsigned char) (pixel & 0xff);
pixel>>=8;
}
- for (k=0; k < (int) bytes_per_pixel; k++)
- *q++=channel[k];
p+=GetPixelChannels(canvas);
}
q+=scanline_pad;