(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if (image->colorspace == colorspace)
return(SetImageColorspace(image,colorspace,exception));
- if ((image->colorspace == RGBColorspace) &&
- ((colorspace == GRAYColorspace) || (colorspace == sGRAYColorspace)))
+ (void) DeleteImageProfile(image,"icc");
+ (void) DeleteImageProfile(image,"icm");
+ if (colorspace == GRAYColorspace)
return(GrayscaleImage(image,Rec709LuminancePixelIntensityMethod,exception));
+ if (colorspace == sGRAYColorspace)
+ return(GrayscaleImage(image,Rec709LumaPixelIntensityMethod,exception));
if (colorspace == UndefinedColorspace)
return(SetImageColorspace(image,colorspace,exception));
/*
Convert the reference image from an alternate colorspace to sRGB.
*/
- (void) DeleteImageProfile(image,"icc");
- (void) DeleteImageProfile(image,"icm");
if (IssRGBColorspace(colorspace) != MagickFalse)
return(TransformsRGBImage(image,exception));
status=MagickTrue;