From: cristy Date: Tue, 17 Apr 2012 12:20:23 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5781 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f3c6f8f84875a945e4e80a623a15b168c1e8b78;p=imagemagick --- diff --git a/MagickCore/colorspace.c b/MagickCore/colorspace.c index 48bfb5896..e56c9bb11 100644 --- a/MagickCore/colorspace.c +++ b/MagickCore/colorspace.c @@ -214,8 +214,11 @@ MagickExport MagickBooleanType RGBTransformImage(Image *image, assert(colorspace != sRGBColorspace); assert(colorspace != TransparentColorspace); assert(colorspace != UndefinedColorspace); - if (SetImageColorspace(image,colorspace,exception) == MagickFalse) - return(MagickFalse); + if (IsGrayColorspace(colorspace) != MagickFalse) + (void) SetImageColorspace(image,sRGBColorspace,exception); + else + if (SetImageColorspace(image,colorspace,exception) == MagickFalse) + return(MagickFalse); status=MagickTrue; progress=0; switch (colorspace)