]> granicus.if.org Git - imagemagick/commitdiff
YIQ() is a unreognized color
authorCristy <urban-warrior@imagemagick.org>
Thu, 24 Oct 2019 17:51:44 +0000 (13:51 -0400)
committerCristy <urban-warrior@imagemagick.org>
Thu, 24 Oct 2019 17:51:44 +0000 (13:51 -0400)
MagickCore/color.c

index 8367a3b974c2fe7f7cba62a6d0cb29d8fa4f61be..4dd57f30def56723a42ef48007d0ec7c5d2f3840 100644 (file)
@@ -2243,11 +2243,17 @@ MagickExport MagickBooleanType QueryColorCompliance(const char *name,
   assert(name != (const char *) NULL);
   (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",name);
   assert(color != (PixelInfo *) NULL);
-  GetPixelInfo((Image *) NULL,color);
-  if ((name == (char *) NULL) || (*name == '\0'))
+  if (name == (char *) NULL)
     name=BackgroundColor;
+  if (*name == '\0')
+    {
+      (void) ThrowMagickException(exception,GetMagickModule(),OptionWarning,
+        "UnrecognizedColor","`%s'",name);
+      return(MagickFalse);
+    }
   while (isspace((int) ((unsigned char) *name)) != 0)
     name++;
+  GetPixelInfo((Image *) NULL,color);
   if (*name == '#')
     {
       char