]> granicus.if.org Git - imagemagick/blobdiff - coders/gradient.c
Check for sampling-factor option only if sampling-factor image property is NULL.
[imagemagick] / coders / gradient.c
index 110de9e2c37daa848021bde75832b0bf0c893f11..3104ae62381288be0c465e2b313f49039fa92a35 100644 (file)
@@ -158,8 +158,7 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info,
       image=DestroyImageList(image);
       return((Image *) NULL);
     }
-  (void) SetImageColorspace(image,start_color.colorspace,exception);
-  if ((start_color.matte == MagickFalse) && (stop_color.matte == MagickFalse))
+  if ((start_color.alpha_trait != BlendPixelTrait) && (stop_color.alpha_trait != BlendPixelTrait))
     (void) SetImageAlphaChannel(image,DeactivateAlphaChannel,exception);
   return(GetFirstImageInList(image));
 }