From: cristy Date: Thu, 21 Jun 2012 01:15:29 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5382 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0cacf4f3ab8904a1b9144ef62ae8122ad254c277;p=imagemagick --- diff --git a/coders/gradient.c b/coders/gradient.c index 5682ab304..6365de090 100644 --- a/coders/gradient.c +++ b/coders/gradient.c @@ -145,7 +145,6 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info, start_color.green); start_color.blue=QuantumRange*DecompandsRGB(QuantumScale* start_color.blue); - start_color.colorspace=RGBColorspace; } if (IssRGBColorspace(stop_color.colorspace) != MagickFalse) { @@ -155,7 +154,6 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info, stop_color.green); stop_color.blue=QuantumRange*DecompandsRGB(QuantumScale* stop_color.blue); - stop_color.colorspace=RGBColorspace; } status=GradientImage(image,LocaleCompare(image_info->magick,"GRADIENT") == 0 ? LinearGradient : RadialGradient,PadSpread,&start_color,&stop_color, @@ -168,6 +166,11 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info, (void) SetImageColorspace(image,start_color.colorspace,exception); if ((start_color.matte == MagickFalse) && (stop_color.matte == MagickFalse)) (void) SetImageAlphaChannel(image,DeactivateAlphaChannel,exception); + if (IssRGBColorspace(start_color.colorspace) != MagickFalse) + { + (void) SetImageColorspace(image,RGBColorspace,exception); + (void) TransformImageColorspace(image,sRGBColorspace,exception); + } return(GetFirstImageInList(image)); }