% July 1992 %
% %
% %
-% Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
image->depth=8;
if ((dib_info.number_colors != 0) || (dib_info.bits_per_pixel < 16))
{
+ size_t
+ one;
+
image->storage_class=PseudoClass;
image->colors=dib_info.number_colors;
+ one=1;
if (image->colors == 0)
- image->colors=1L << dib_info.bits_per_pixel;
+ image->colors=one << dib_info.bits_per_pixel;
}
if (image_info->size)
{
}
for (x=(ssize_t) (image->columns+7)/8; x < (ssize_t) bytes_per_line; x++)
*q++=0x00;
- status=SetImageProgress(image,SaveImageTag,y,image->rows);
+ status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
+ image->rows);
if (status == MagickFalse)
break;
}
*q++=(unsigned char) indexes[x];
for ( ; x < (ssize_t) bytes_per_line; x++)
*q++=0x00;
- status=SetImageProgress(image,SaveImageTag,y,image->rows);
+ status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
+ image->rows);
if (status == MagickFalse)
break;
}
*q++=(unsigned char)(word >> 8);
p++;
}
- for (x=2L*image->columns; x < (ssize_t) bytes_per_line; x++)
+ for (x=(ssize_t) (2*image->columns); x < (ssize_t) bytes_per_line; x++)
*q++=0x00;
- status=SetImageProgress(image,SaveImageTag,y,image->rows);
+ status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
+ image->rows);
if (status == MagickFalse)
break;
}
p++;
}
if (dib_info.bits_per_pixel == 24)
- for (x=3L*image->columns; x < (ssize_t) bytes_per_line; x++)
+ for (x=(ssize_t) (3*image->columns); x < (ssize_t) bytes_per_line; x++)
*q++=0x00;
- status=SetImageProgress(image,SaveImageTag,y,image->rows);
+ status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
+ image->rows);
if (status == MagickFalse)
break;
}
/*
Write DIB header.
*/
- (void) WriteBlobLSBLong(image,dib_info.size);
- (void) WriteBlobLSBLong(image,(size_t) dib_info.width);
+ (void) WriteBlobLSBLong(image,(unsigned int) dib_info.size);
+ (void) WriteBlobLSBLong(image,dib_info.width);
(void) WriteBlobLSBLong(image,(unsigned short) dib_info.height);
(void) WriteBlobLSBShort(image,(unsigned short) dib_info.planes);
(void) WriteBlobLSBShort(image,dib_info.bits_per_pixel);
- (void) WriteBlobLSBLong(image,dib_info.compression);
- (void) WriteBlobLSBLong(image,dib_info.image_size);
- (void) WriteBlobLSBLong(image,dib_info.x_pixels);
- (void) WriteBlobLSBLong(image,dib_info.y_pixels);
- (void) WriteBlobLSBLong(image,dib_info.number_colors);
- (void) WriteBlobLSBLong(image,dib_info.colors_important);
+ (void) WriteBlobLSBLong(image,(unsigned int) dib_info.compression);
+ (void) WriteBlobLSBLong(image,(unsigned int) dib_info.image_size);
+ (void) WriteBlobLSBLong(image,(unsigned int) dib_info.x_pixels);
+ (void) WriteBlobLSBLong(image,(unsigned int) dib_info.y_pixels);
+ (void) WriteBlobLSBLong(image,(unsigned int) dib_info.number_colors);
+ (void) WriteBlobLSBLong(image,(unsigned int) dib_info.colors_important);
if (image->storage_class == PseudoClass)
{
if (dib_info.bits_per_pixel <= 8)