(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 29 Mar 2014 14:14:06 +0000 (14:14 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 29 Mar 2014 14:14:06 +0000 (14:14 +0000)
MagickCore/colorspace.c

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