{
(void) TransformImageColorspace(image,sRGBColorspace,exception);
count=GetNumberColors(image,NULL,exception);
- for (bits_per_pixel=1; (one << bits_per_pixel) < count; bits_per_pixel*=2) ;
+ for (bits_per_pixel=1; (one << bits_per_pixel) < count; bits_per_pixel*=2) ;
if (bits_per_pixel > 16)
bits_per_pixel=16;
else
last_row=(unsigned char *) NULL;
if (image_info->compression == FaxCompression)
{
- last_row=(unsigned char *) AcquireQuantumMemory(bytes_per_row,
+ last_row=(unsigned char *) AcquireQuantumMemory(bytes_per_row+256,
sizeof(*last_row));
if (last_row == (unsigned char *) NULL)
{
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
}
}
- one_row=(unsigned char *) AcquireQuantumMemory(bytes_per_row,
+ one_row=(unsigned char *) AcquireQuantumMemory(bytes_per_row+256,
sizeof(*one_row));
if (one_row == (unsigned char *) NULL)
{