]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 10 Jul 2012 13:54:20 +0000 (13:54 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 10 Jul 2012 13:54:20 +0000 (13:54 +0000)
coders/gradient.c

index 678762b6f3237f08687431a57f60cf077a09bc26..708556400d4628fefe8040ac6f19af4f05eb64d5 100644 (file)
@@ -168,7 +168,8 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info,
       return((Image *) NULL);
     }
   (void) SetImageColorspace(image,start_color.colorspace,exception);
-  if (IsImageGray(image,exception) != MagickFalse)
+  if ((IsPixelInfoGray(&start_color) != MagickFalse) &&
+      (IsPixelInfoGray(&stop_color) != MagickFalse))
     (void) SetImageColorspace(image,GRAYColorspace,exception);
   if ((start_color.matte == MagickFalse) && (stop_color.matte == MagickFalse))
     (void) SetImageAlphaChannel(image,DeactivateAlphaChannel,exception);