From: Cristy Date: Sun, 1 Jan 2017 19:42:22 +0000 (-0500) Subject: ... X-Git-Tag: 7.0.4-2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e84a165162d4a867e4c70e7d1d4c9e35445f9f6e;p=imagemagick ... --- diff --git a/coders/pnm.c b/coders/pnm.c index 21c0e895d..3db8d70a9 100644 --- a/coders/pnm.c +++ b/coders/pnm.c @@ -1690,6 +1690,8 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image, { packet_size=1; (void) CopyMagickString(type,"GRAYSCALE",MagickPathExtent); + if (IsImageMonochrome(image) != MagickFalse) + (void) CopyMagickString(type,"BLACKANDWHITE",MagickPathExtent); break; } default: @@ -1713,8 +1715,8 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image, "DEPTH %.20g\nMAXVAL %.20g\n",(double) packet_size,(double) ((MagickOffsetType) GetQuantumRange(image->depth))); (void) WriteBlobString(image,buffer); - (void) FormatLocaleString(buffer,MagickPathExtent,"TUPLTYPE %s\nENDHDR\n", - type); + (void) FormatLocaleString(buffer,MagickPathExtent, + "TUPLTYPE %s\nENDHDR\n",type); (void) WriteBlobString(image,buffer); } /*