]> granicus.if.org Git - imagemagick/commitdiff
Declare named colors, gray0-gray100, as sGray
authorCristy <urban-warrior@imagemagick.org>
Sun, 24 Dec 2017 23:55:32 +0000 (18:55 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sun, 24 Dec 2017 23:55:32 +0000 (18:55 -0500)
MagickCore/color.c

index ee1e4eb87d980ce9665df511734c9d034bb98564..ad206dbee439d97011aa5808df731c760fd5d301 100644 (file)
@@ -2523,6 +2523,9 @@ MagickExport MagickBooleanType QueryColorCompliance(const char *name,
   if (p == (const ColorInfo *) NULL)
     return(MagickFalse);
   color->colorspace=sRGBColorspace;
+  if ((LocaleNCompare(name,"gray",4) == 0) || 
+      (LocaleNCompare(name,"grey",4) == 0))
+    color->colorspace=sGRAYColorspace;
   color->depth=8;
   color->alpha_trait=p->color.alpha != OpaqueAlpha ? BlendPixelTrait :
     UndefinedPixelTrait;