]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 16 Oct 2013 10:35:19 +0000 (10:35 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 16 Oct 2013 10:35:19 +0000 (10:35 +0000)
MagickCore/colorspace-private.h
MagickCore/colorspace.c
coders/gradient.c

index 6576f95f855f9bcd456e9b4435e860e9894cc09c..60013fef98fa85b5d472781575119c9f1799af5d 100644 (file)
@@ -92,8 +92,7 @@ static inline MagickBooleanType IsGrayColorspace(
 
 static inline MagickBooleanType IsRGBColorspace(const ColorspaceType colorspace)
 {
-  if ((colorspace == RGBColorspace) || (colorspace == scRGBColorspace) ||
-      (colorspace == XYZColorspace))
+  if ((colorspace == RGBColorspace) || (colorspace == scRGBColorspace))
     return(MagickTrue);
   return(MagickFalse);
 }
index 3a7a95bd63c83cb3bd26698957d6a302be72999d..3fc2dfeedd657189f741f14ab4f3a46f70727357 100644 (file)
@@ -1067,7 +1067,8 @@ MagickExport MagickBooleanType SetImageColorspace(Image *image,
       type=GrayscaleType;
     }
   else
-    if (IsRGBColorspace(colorspace) != MagickFalse)
+    if ((IsRGBColorspace(colorspace) != MagickFalse) ||
+        (colorspace == XYZColorspace))
       image->gamma=1.000;
   if (image->gamma == (1.000/2.200))
     {
index d152af85723ead634b074a4b800865b54018514f..e01da8b4c0b4155e8c17c5972f77baf49ca5291d 100644 (file)
@@ -132,9 +132,9 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info,
       (void) sscanf(image_info->filename,"%*[^-]-%[^-]",colorname+4);
       icc_color=MagickTrue;
     }
-  if (IsGrayColorspace(start_pixel.colorspace) != MagickFalse)
+  if (IsGrayColorspace(start_color.colorspace) != MagickFalse)
     image->intensity=Rec601LuminancePixelIntensityMethod;
-  (void) SetImageColorspace(image,start_pixel.colorspace,exception);
+  (void) SetImageColorspace(image,start_color.colorspace,exception);
   status=QueryColorCompliance(colorname,AllCompliance,&start_color,exception);
   if (status == MagickFalse)
     {