]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1285
authorCristy <urban-warrior@imagemagick.org>
Sat, 1 Sep 2018 11:49:12 +0000 (07:49 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 1 Sep 2018 11:49:12 +0000 (07:49 -0400)
MagickCore/property.c

index 9a39477a880af0201152829474c144bb8204252c..52be49e49dffd08b6c52f995651c619285d85032 100644 (file)
@@ -2868,6 +2868,13 @@ MagickExport const char *GetMagickProperty(ImageInfo *image_info,
             (void) ConcatenateMagickString(value,"a",MagickPathExtent);
           break;
         }
+      if (LocaleCompare("colors",property) == 0)
+        {
+          image->colors=GetNumberColors(image,(FILE *) NULL,exception);
+          (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
+            image->colors);
+          break;
+        }
       if (LocaleCompare("colorspace",property) == 0)
         {
           WarnNoImageReturn("\"%%[%s]\"",property);