From e84a165162d4a867e4c70e7d1d4c9e35445f9f6e Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 1 Jan 2017 14:42:22 -0500 Subject: [PATCH] ... --- coders/pnm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); } /* -- 2.50.1