{
MagickOffsetType
position;
-
+
position=TellBlob(image);
p=pixels;
for (y=0; y < (ssize_t) iris_info.rows; y++)
/*
Initialize image structure.
*/
- image->alpha_trait=iris_info.depth == 4 ? BlendPixelTrait :
+ image->alpha_trait=iris_info.depth == 4 ? BlendPixelTrait :
UndefinedPixelTrait;
image->columns=iris_info.columns;
image->rows=iris_info.rows;
bytes_per_line,
extent,
height,
- pixels_length;
+ pixels_length,
+ quantum;
ssize_t
count,
sun_data=(unsigned char *) RelinquishMagickMemory(sun_data);
ThrowReaderException(ResourceLimitError,"ImproperImageHeader");
}
- bytes_per_line+=7;
+ quantum=sun_info.depth == 1 ? 15 : 7;
+ bytes_per_line+=quantum;
bytes_per_line<<=1;
- if ((bytes_per_line >> 1) != (sun_info.width*sun_info.depth+7))
+ if ((bytes_per_line >> 1) != (sun_info.width*sun_info.depth+quantum))
{
sun_data=(unsigned char *) RelinquishMagickMemory(sun_data);
ThrowReaderException(ResourceLimitError,"ImproperImageHeader");
/*
Full color SUN raster.
*/
- sun_info.depth=(unsigned int) image->alpha_trait != UndefinedPixelTrait ?
- 32U : 24U;
- sun_info.length=(unsigned int) ((image->alpha_trait != UndefinedPixelTrait ?
- 4 : 3)*number_pixels);
+ sun_info.depth=(unsigned int) image->alpha_trait !=
+ UndefinedPixelTrait ? 32U : 24U;
+ sun_info.length=(unsigned int) ((image->alpha_trait !=
+ UndefinedPixelTrait ? 4 : 3)*number_pixels);
sun_info.length+=sun_info.length & 0x01 ? (unsigned int) image->rows :
0;
}