]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sun, 1 Jan 2017 19:42:22 +0000 (14:42 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sun, 1 Jan 2017 19:42:22 +0000 (14:42 -0500)
coders/pnm.c

index 21c0e895d34fdada2756129ac577c07193294167..3db8d70a9465c7009c8dbbcb28853830d3ee58fd 100644 (file)
@@ -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);
       }
     /*