From: Cristy Date: Sun, 16 Jul 2017 15:18:07 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/561 X-Git-Tag: 7.0.6-2~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8647f11ddfd6f85a6cc39654c7e78c2bc6412e4;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/561 --- diff --git a/coders/ps.c b/coders/ps.c index db2260c32..cf1eaf46f 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -1153,7 +1153,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image, { #define WriteRunlengthPacket(image,pixel,length,p) \ { \ - if ((image->alpha_trait != UndefinedPixelTrait) && \ + if ((image->alpha_trait != UndefinedPixelTrait) && (length != 0) && \ (GetPixelAlpha(image,p) == (Quantum) TransparentAlpha)) \ { \ q=PopHexPixel(hex_digits,0xff,q); \ @@ -1999,8 +1999,8 @@ RestoreMSCWarning /* Dump DirectClass image. */ - (void) FormatLocaleString(buffer,MagickPathExtent,"%.20g %.20g\n0\n%d\n", - (double) image->columns,(double) image->rows, + (void) FormatLocaleString(buffer,MagickPathExtent, + "%.20g %.20g\n0\n%d\n",(double) image->columns,(double) image->rows, compression == RLECompression ? 1 : 0); (void) WriteBlobString(image,buffer); switch (compression)