Changeset 8658
- Timestamp:
- 07/12/12 08:02:51 (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/branches/ImageMagick-6/coders/gradient.c
r8655 r8658 154 154 } 155 155 (void) QueryMagickColor(colorname,&stop_pixel,exception); 156 if (IssRGBColorspace(start_pixel.colorspace) != MagickFalse)157 {158 start_color.red=ClampToQuantum(QuantumRange*DecompandsRGB(QuantumScale*159 start_color.red));160 start_color.green=ClampToQuantum(QuantumRange*DecompandsRGB(QuantumScale*161 start_color.green));162 start_color.blue=ClampToQuantum(QuantumRange*DecompandsRGB(QuantumScale*163 start_color.blue));164 start_pixel.colorspace=RGBColorspace;165 }166 if (IssRGBColorspace(stop_pixel.colorspace) != MagickFalse)167 {168 stop_color.red=ClampToQuantum(QuantumRange*DecompandsRGB(QuantumScale*169 stop_color.red));170 stop_color.green=ClampToQuantum(QuantumRange*DecompandsRGB(QuantumScale*171 stop_color.green));172 stop_color.blue=ClampToQuantum(QuantumRange*DecompandsRGB(QuantumScale*173 stop_color.blue));174 stop_pixel.colorspace=RGBColorspace;175 }176 156 status=GradientImage(image,LocaleCompare(image_info->magick,"GRADIENT") == 0 ? 177 157 LinearGradient : RadialGradient,PadSpread,&start_color,&stop_color); … … 181 161 return((Image *) NULL); 182 162 } 183 (void) SetImageColorspace(image,start_pixel.colorspace);184 if ((IsPixelGray(&start_color) != MagickFalse) &&185 (IsPixelGray(&stop_color) != MagickFalse))186 (void) SetImageColorspace(image,GRAYColorspace);187 163 if ((start_pixel.matte == MagickFalse) && (stop_pixel.matte == MagickFalse)) 188 164 (void) SetImageAlphaChannel(image,DeactivateAlphaChannel);
Note: See TracChangeset
for help on using the changeset viewer.
