]> granicus.if.org Git - imagemagick/commitdiff
Return pseudo-class image for -type bilevel option
authorCristy <urban-warrior@imagemagick.org>
Sat, 3 Mar 2018 01:26:16 +0000 (20:26 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 3 Mar 2018 01:26:16 +0000 (20:26 -0500)
MagickCore/quantize.c

index 5c3a4be063b439b6f34fe59ec115f33e21a7096f..a9037af6b2be0250cf82925cf635c335a7b1c116 100644 (file)
@@ -668,7 +668,8 @@ static MagickBooleanType AssignImageColors(Image *image,CubeInfo *cube_info,
         }
     }
   (void) SyncImage(image,exception);
-  if (cube_info->quantize_info->colorspace != UndefinedColorspace)
+  if ((cube_info->quantize_info->colorspace != UndefinedColorspace) &&
+      (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse))
     (void) TransformImageColorspace(image,colorspace,exception);
   return(MagickTrue);
 }