% 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 %
*pixels;
size_t
- num_pad_bytes, /* TS */
bits_per_pixel,
+ num_pad_bytes, /* TS */
+ one,
packets;
/*
/*
Read record header.
*/
- img_offset=(ssize_t) ReadBlobMSBLong(image); /* TS */
+ img_offset=(int) ReadBlobMSBLong(image); /* TS */
attributes=(unsigned char) ReadBlobByte(image);
count=ReadBlob(image,3,(unsigned char *) tag);
if (count != 3 || memcmp(tag,"\x6f\x80\x00",3) != 0)
if (pdb_info.number_records > 1)
{
- comment_offset=(ssize_t) ReadBlobMSBLong(image);
+ comment_offset=(int) ReadBlobMSBLong(image);
attributes=(unsigned char) ReadBlobByte(image);
count=ReadBlob(image,3,(unsigned char *) tag);
if (count != 3 || memcmp(tag,"\x6f\x80\x01",3) != 0)
image->depth=8;
image->storage_class=PseudoClass;
bits_per_pixel=pdb_image.type == 0 ? 2UL : pdb_image.type == 2 ? 4UL : 1UL;
- if (AcquireImageColormap(image,1 << bits_per_pixel) == MagickFalse)
+ one=1;
+ if (AcquireImageColormap(image,one << bits_per_pixel) == MagickFalse)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
if (image_info->ping != MagickFalse)
{
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
- status=SetImageProgress(image,LoadImageTag,y,image->rows);
+ status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
+ image->rows);
if (status == MagickFalse)
break;
}
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
- status=SetImageProgress(image,LoadImageTag,y,image->rows);
+ status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
+ image->rows);
if (status == MagickFalse)
break;
}
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
- status=SetImageProgress(image,LoadImageTag,y,image->rows);
+ status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
+ image->rows);
if (status == MagickFalse)
break;
}
(void) WriteBlob(image,32,(unsigned char *) pdb_info.name);
(void) WriteBlobMSBShort(image,(unsigned short) pdb_info.attributes);
(void) WriteBlobMSBShort(image,(unsigned short) pdb_info.version);
- (void) WriteBlobMSBLong(image,pdb_info.create_time);
- (void) WriteBlobMSBLong(image,pdb_info.modify_time);
- (void) WriteBlobMSBLong(image,pdb_info.archive_time);
- (void) WriteBlobMSBLong(image,pdb_info.modify_number);
- (void) WriteBlobMSBLong(image,pdb_info.application_info);
- (void) WriteBlobMSBLong(image,pdb_info.sort_info);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_info.create_time);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_info.modify_time);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_info.archive_time);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_info.modify_number);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_info.application_info);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_info.sort_info);
(void) WriteBlob(image,4,(unsigned char *) pdb_info.type);
(void) WriteBlob(image,4,(unsigned char *) pdb_info.id);
- (void) WriteBlobMSBLong(image,(size_t) pdb_info.seed);
- (void) WriteBlobMSBLong(image,(size_t) pdb_info.next_record);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_info.seed);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_info.next_record);
(void) WriteBlobMSBShort(image,(unsigned short) pdb_info.number_records);
(void) CopyMagickString(pdb_image.name,pdb_info.name,32);
pdb_image.version=1; /* RLE Compressed */
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
- bits=8/(ssize_t) bits_per_pixel-1; /* start at most significant bits */
+ bits=8/(int) bits_per_pixel-1; /* start at most significant bits */
literal=0;
repeat=0;
q=runlength;
literal-=0x80;
}
}
- bits=8/(ssize_t) bits_per_pixel-1;
+ bits=8/(int) bits_per_pixel-1;
buffer[literal+repeat]=0x00;
}
}
- status=SetImageProgress(image,SaveImageTag,y,image->rows);
+ status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
+ image->rows);
if (status == MagickFalse)
break;
}
/*
Write the Image record header.
*/
- (void) WriteBlobMSBLong(image,(size_t)
+ (void) WriteBlobMSBLong(image,(unsigned int)
(TellBlob(image)+8*pdb_info.number_records));
(void) WriteBlobByte(image,0x40);
(void) WriteBlobByte(image,0x6f);
/*
Write the comment record header.
*/
- (void) WriteBlobMSBLong(image,(size_t) (TellBlob(image)+8+58+q-
+ (void) WriteBlobMSBLong(image,(unsigned int) (TellBlob(image)+8+58+q-
runlength));
(void) WriteBlobByte(image,0x40);
(void) WriteBlobByte(image,0x6f);
(void) WriteBlob(image,32,(unsigned char *) pdb_image.name);
(void) WriteBlobByte(image,(unsigned char) pdb_image.version);
(void) WriteBlobByte(image,(unsigned char) pdb_image.type);
- (void) WriteBlobMSBLong(image,pdb_image.reserved_1);
- (void) WriteBlobMSBLong(image,pdb_image.note);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_image.reserved_1);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_image.note);
(void) WriteBlobMSBShort(image,(unsigned short) pdb_image.x_last);
(void) WriteBlobMSBShort(image,(unsigned short) pdb_image.y_last);
- (void) WriteBlobMSBLong(image,pdb_image.reserved_2);
+ (void) WriteBlobMSBLong(image,(unsigned int) pdb_image.reserved_2);
(void) WriteBlobMSBShort(image,(unsigned short) pdb_image.x_anchor);
(void) WriteBlobMSBShort(image,(unsigned short) pdb_image.y_anchor);
(void) WriteBlobMSBShort(image,(unsigned short) pdb_image.width);