]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 20 Jun 2012 12:09:28 +0000 (12:09 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 20 Jun 2012 12:09:28 +0000 (12:09 +0000)
MagickCore/paint.c
coders/gradient.c

index 96516e594f03cdb3b211e436732ba19fb4fb10f1..c992cf89443ed198d5b25b0d241829aae789b706 100644 (file)
@@ -455,13 +455,9 @@ MagickExport MagickBooleanType GradientImage(Image *image,
   /*
     Draw a gradient on the image.
   */
-  if ((start_color->matte == MagickFalse) && (stop_color->matte == MagickFalse))
-    image->matte=MagickFalse;
   (void) SetImageColorspace(image,start_color->colorspace,exception);
   status=DrawGradientImage(image,draw_info,exception);
   draw_info=DestroyDrawInfo(draw_info);
-  if ((start_color->matte == MagickFalse) && (stop_color->matte == MagickFalse))
-    image->matte=MagickFalse;
   return(status);
 }
 \f
index 13563a64cc4563d9e5773efe8ddfa4132a47e549..d36e3dc7fbd626776db6bb32e7a99f9fae541685 100644 (file)
@@ -145,8 +145,10 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info,
       image=DestroyImageList(image);
       return((Image *) NULL);
     }
-  if (IssRGBColorspace(image->colorspace) != MagickFalse)
+  if (IssRGBColorspace(start_color->colorspace) != MagickFalse)
     (void) SetImageColorspace(image,RGBColorspace,exception);
+  else
+    (void) SetImageColorspace(image,start_color->colorspace,exception);
   return(GetFirstImageInList(image));
 }
 \f