From c94528654422e3ed9d66da9bbbead654b702047b Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Tue, 22 May 2018 07:06:38 +0200 Subject: [PATCH] Properly set the compressed data size when encoding JPEG compressed PICT files This portion of the file format obeys the following specification: http://mirror.informatimago.com/next/developer.apple.com/documentation/QuickTime/INMAC/QT/iqImageCompMgr.17.htm#26170 --- coders/pict.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/coders/pict.c b/coders/pict.c index 5551a36ea..8aafadec2 100644 --- a/coders/pict.c +++ b/coders/pict.c @@ -1898,8 +1898,9 @@ static MagickBooleanType WritePICTImage(const ImageInfo *image_info, (void) WriteBlobMSBShort(image,(unsigned short) x_resolution); (void) WriteBlobMSBShort(image,0x0000); (void) WriteBlobMSBShort(image,(unsigned short) y_resolution); - (void) WriteBlobMSBLong(image,0x00000000U); - (void) WriteBlobMSBLong(image,0x87AC0001U); + (void) WriteBlobMSBShort(image,0x0000); + (void) WriteBlobMSBLong(image,length); + (void) WriteBlobMSBShort(image,0x0001); (void) WriteBlobMSBLong(image,0x0B466F74U); (void) WriteBlobMSBLong(image,0x6F202D20U); (void) WriteBlobMSBLong(image,0x4A504547U); -- 2.40.0