]> granicus.if.org Git - imagemagick/commitdiff
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31879
authorCristy <urban-warrior@imagemagick.org>
Tue, 9 May 2017 00:02:18 +0000 (20:02 -0400)
committerCristy <urban-warrior@imagemagick.org>
Tue, 9 May 2017 00:02:18 +0000 (20:02 -0400)
MagickCore/channel.c

index 7bf76ba1d04bf4be445e296ab73f695760050976..4792927ed7203f1bfaf12edc2581c75669199af0 100644 (file)
@@ -1259,6 +1259,9 @@ MagickExport MagickBooleanType SetImageAlphaChannel(Image *image,
       /*
         Set alpha channel by shape.
       */
+      status=SetImageStorageClass(image,DirectClass,exception);
+      if (status == MagickFalse)
+        break;
       image->alpha_trait=UpdatePixelTrait;
       (void) SetImageMask(image,WritePixelMask,image,exception);
       (void) LevelImageColors(image,&image->background_color,