]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 12 Sep 2011 12:19:31 +0000 (12:19 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 12 Sep 2011 12:19:31 +0000 (12:19 +0000)
MagickCore/attribute.c

index abef95646fd0a26925e237007ef47968354e8f0e..1650fc243fb8af327bc772c8049cacfdf9692b47 100644 (file)
@@ -589,7 +589,8 @@ MagickExport MagickBooleanType IsImageGray(const Image *image,
   if ((image->type == BilevelType) || (image->type == GrayscaleType) ||
       (image->type == GrayscaleMatteType))
     return(MagickTrue);
-  if ((image->colorspace == sRGB) || (image->colorspace == CMYKColorspace))
+  if ((image->colorspace != RGBColorspace) &&
+      (image->colorspace != GRAYColorspace))
     return(MagickFalse);
   type=BilevelType;
   image_view=AcquireCacheView(image);
@@ -673,7 +674,8 @@ MagickExport MagickBooleanType IsImageMonochrome(const Image *image,
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   if (image->type == BilevelType)
     return(MagickTrue);
-  if ((image->colorspace == sRGB) || (image->colorspace == CMYKColorspace))
+  if ((image->colorspace != RGBColorspace) &&
+      (image->colorspace != GRAYColorspace))
     return(MagickFalse);
   type=BilevelType;
   image_view=AcquireCacheView(image);