{
#define CFormat "/Filter [ /%s ]\n"
#define ObjectsPerImage 14
+#define ThrowPDFException(exception,message) \
+{ \
+ if (xref != (MagickOffsetType *) NULL) \
+ xref=(MagickOffsetType *) RelinquishMagickMemory(xref); \
+ ThrowWriterException((exception),(message)); \
+}
DisableMSCWarning(4310)
static const char
offset=TellBlob(image);
number_pixels=(MagickSizeType) image->columns*image->rows;
if ((4*number_pixels) != (MagickSizeType) ((size_t) (4*number_pixels)))
- ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
+ ThrowPDFException(ResourceLimitError,"MemoryAllocationFailed");
if ((compression == FaxCompression) || (compression == Group4Compression) ||
((image_info->type != TrueColorType) &&
(SetImageGray(image,exception) != MagickFalse)))
length=(size_t) number_pixels;
pixel_info=AcquireVirtualMemory(length,sizeof(*pixels));
if (pixel_info == (MemoryInfo *) NULL)
- ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
+ ThrowPDFException(ResourceLimitError,"MemoryAllocationFailed");
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
/*
Dump Runlength encoded pixels.
if (pixel_info == (MemoryInfo *) NULL)
{
xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
- ThrowWriterException(ResourceLimitError,
- "MemoryAllocationFailed");
+ ThrowPDFException(ResourceLimitError,"MemoryAllocationFailed");
}
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
/*
if (pixel_info == (MemoryInfo *) NULL)
{
xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
- ThrowWriterException(ResourceLimitError,
+ ThrowPDFException(ResourceLimitError,
"MemoryAllocationFailed");
}
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
if (pixel_info == (MemoryInfo *) NULL)
{
tile_image=DestroyImage(tile_image);
- ThrowWriterException(ResourceLimitError,
- "MemoryAllocationFailed");
+ ThrowPDFException(ResourceLimitError,"MemoryAllocationFailed");
}
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
/*
if (pixel_info == (MemoryInfo *) NULL)
{
tile_image=DestroyImage(tile_image);
- ThrowWriterException(ResourceLimitError,
- "MemoryAllocationFailed");
+ ThrowPDFException(ResourceLimitError,"MemoryAllocationFailed");
}
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
/*
if (pixel_info == (MemoryInfo *) NULL)
{
tile_image=DestroyImage(tile_image);
- ThrowWriterException(ResourceLimitError,
+ ThrowPDFException(ResourceLimitError,
"MemoryAllocationFailed");
}
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
if (pixel_info == (MemoryInfo *) NULL)
{
image=DestroyImage(image);
- ThrowWriterException(ResourceLimitError,
- "MemoryAllocationFailed");
+ ThrowPDFException(ResourceLimitError,"MemoryAllocationFailed");
}
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
/*