From 7f8077501b6b65f12083ca68c571a0876ae8b1f7 Mon Sep 17 00:00:00 2001 From: cristy Date: Sat, 29 Mar 2014 13:37:01 +0000 Subject: [PATCH] --- MagickCore/colorspace.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MagickCore/colorspace.c b/MagickCore/colorspace.c index 1a3c49ae4..3304eebc5 100644 --- a/MagickCore/colorspace.c +++ b/MagickCore/colorspace.c @@ -1137,10 +1137,13 @@ MagickExport MagickBooleanType TransformImageColorspace(Image *image, assert(image->signature == MagickSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); - if (colorspace == UndefinedColorspace) - return(SetImageColorspace(image,colorspace,exception)); if (image->colorspace == colorspace) return(MagickTrue); + if ((IssRGBCompatibleColorspace(image->colorspace) != MagickFalse) && + (colorspace == sRGBColorspace)) + return(MagickTrue); + if (colorspace == UndefinedColorspace) + return(SetImageColorspace(image,colorspace,exception)); /* Convert the reference image from an alternate colorspace to sRGB. */ -- 2.40.0