From: Cristy Date: Sun, 7 May 2017 18:26:08 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/463 X-Git-Tag: 7.0.5-6~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c5672b06b8be03a4ac37875d99818c15a5f928a;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/463 --- diff --git a/ChangeLog b/ChangeLog index 0e02cba29..84bc7baf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2017-05-06 7.0.5-6 Cristy * Restore the -alpha Shape option (reference https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31879). + * Fix transient PDF bug (reference + https://github.com/ImageMagick/ImageMagick/issues/463). 2017-04-24 7.0.5-5 Cristy * Release ImageMagick version 7.0.5-5, GIT revision 19915:12eec43:20170424. diff --git a/coders/pdf.c b/coders/pdf.c index 6d6cc446f..228284023 100644 --- a/coders/pdf.c +++ b/coders/pdf.c @@ -1625,6 +1625,10 @@ RestoreMSCWarning (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent,"/Thumb %.20g 0 R\n", (double) object+8); + profile=GetImageProfile(image,"icc"); + if (profile != (StringInfo *) NULL) + (void) FormatLocaleString(buffer,MagickPathExtent,"/Thumb %.20g 0 R\n", + (double) object+10); (void) WriteBlobString(image,buffer); (void) WriteBlobString(image,">>\n"); (void) WriteBlobString(image,"endobj\n"); @@ -1808,6 +1812,10 @@ RestoreMSCWarning { (void) FormatLocaleString(buffer,MagickPathExtent,"/SMask %.20g 0 R\n", (double) object+7); + profile=GetImageProfile(image,"icc"); + if (profile != (StringInfo *) NULL) + (void) FormatLocaleString(buffer,MagickPathExtent, + "/SMask %.20g 0 R\n",(double) object+9); (void) WriteBlobString(image,buffer); } (void) FormatLocaleString(buffer,MagickPathExtent,"/Length %.20g 0 R\n", @@ -2200,7 +2208,6 @@ RestoreMSCWarning (void) FormatLocaleString(buffer,MagickPathExtent, "[ /Indexed /%s %.20g %.20g 0 R ]\n",device,(double) image->colors- 1,(double) object+3); - (void) WriteBlobString(image,buffer); } else @@ -2324,6 +2331,10 @@ RestoreMSCWarning (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent,"/ColorSpace %.20g 0 R\n", (double) object-1); + profile=GetImageProfile(image,"icc"); + if (profile != (StringInfo *) NULL) + (void) FormatLocaleString(buffer,MagickPathExtent, + "/ColorSpace %.20g 0 R\n",(double) object-3); (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent,"/BitsPerComponent %d\n", (compression == FaxCompression) || (compression == Group4Compression) ?