]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 29 Mar 2014 15:42:29 +0000 (15:42 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 29 Mar 2014 15:42:29 +0000 (15:42 +0000)
MagickCore/colorspace.c

index 745a143b1493e03651d638a6935ec8bfa7e7ce2b..ce317a60c0a8ffcb1b94b32a0bbdb5fcfaf6fccb 100644 (file)
@@ -1139,10 +1139,11 @@ MagickExport MagickBooleanType TransformImageColorspace(Image *image,
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   if (image->colorspace == colorspace)
     return(MagickTrue);
-  if ((colorspace == Rec709LumaColorspace) && (colorspace == sRGBColorspace))
+  if ((image->colorspace == Rec709LumaColorspace) &&
+      (colorspace == sRGBColorspace))
     return(MagickTrue);
-  if ((colorspace == GRAYColorspace) && (colorspace == sRGBColorspace) &&
-      (image->gamma != 1.0))
+  if ((image->colorspace == GRAYColorspace) && (image->gamma != 1.0) &&
+      (colorspace == sRGBColorspace))
     return(MagickTrue);
   if (colorspace == UndefinedColorspace)
     return(SetImageColorspace(image,colorspace,exception));