]> granicus.if.org Git - imagemagick/commitdiff
Added missing check for alpha channel.
authordirk <dirk@git.imagemagick.org>
Sun, 14 Feb 2016 11:40:06 +0000 (12:40 +0100)
committerdirk <dirk@git.imagemagick.org>
Sun, 14 Feb 2016 11:40:06 +0000 (12:40 +0100)
MagickCore/accelerate.c

index 7d200e9730a305565cdd03324c655362a1bfca76..c0ba6189228abefe206649315a624678288d2910 100644 (file)
@@ -136,6 +136,10 @@ static MagickBooleanType checkAccelerateCondition(const Image* image)
   if (image->read_mask != MagickFalse || image->write_mask != MagickFalse)
     return(MagickFalse);
 
+  /* check if the image has an alpha channel */
+  if (image->alpha_trait == UndefinedPixelTrait)
+    return(MagickFalse);
+
   /* check if pixel order is RGBA */
   if (GetPixelChannelOffset(image,RedPixelChannel) != 0 ||
       GetPixelChannelOffset(image,GreenPixelChannel) != 1 ||