]> granicus.if.org Git - imagemagick/commitdiff
Properly set the compressed data size when encoding JPEG compressed PICT files
authorBastien Bouclet <bastien.bouclet@gmail.com>
Tue, 22 May 2018 05:06:38 +0000 (07:06 +0200)
committerDirk Lemstra <dlemstra@users.noreply.github.com>
Sat, 26 May 2018 08:30:11 +0000 (10:30 +0200)
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

index 5551a36ea6b0c36d6b331ceba668079afa91092a..8aafadec26a2617535d7f7ec0168cfaa36fd038a 100644 (file)
@@ -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);