]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 21 Jun 2012 00:33:44 +0000 (00:33 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 21 Jun 2012 00:33:44 +0000 (00:33 +0000)
MagickCore/pixel-accessor.h
coders/gradient.c

index 3b10274e105f2e9c9c3fc675462fc689bc0941ac..ff007ba7549c5787187247e3ad851ef17c7a3198 100644 (file)
@@ -446,8 +446,7 @@ static inline MagickBooleanType IsPixelMonochrome(const Image *restrict image,
     return(MagickFalse);
   green=(double) pixel[image->channel_map[GreenPixelChannel].offset];
   blue=(double) pixel[image->channel_map[BluePixelChannel].offset];
-  if ((fabs(red-green) < MagickEpsilon) &&
-      (fabs(green-blue) < MagickEpsilon))
+  if ((fabs(red-green) < MagickEpsilon) && (fabs(green-blue) < MagickEpsilon))
     return(MagickTrue);
   return(MagickFalse);
 }
index 9b1439ebe95845d16a7212b01f7356d6f1a579f6..5682ab30460d0192d12b438c249302a716bb0121 100644 (file)
@@ -166,6 +166,8 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info,
       return((Image *) NULL);
     }
   (void) SetImageColorspace(image,start_color.colorspace,exception);
+  if ((start_color.matte == MagickFalse) && (stop_color.matte == MagickFalse))
+    (void) SetImageAlphaChannel(image,DeactivateAlphaChannel,exception);
   return(GetFirstImageInList(image));
 }
 \f