]> granicus.if.org Git - imagemagick/commitdiff
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=34121
authorCristy <urban-warrior@imagemagick.org>
Wed, 13 Jun 2018 22:57:07 +0000 (18:57 -0400)
committerCristy <urban-warrior@imagemagick.org>
Wed, 13 Jun 2018 22:57:07 +0000 (18:57 -0400)
ChangeLog
coders/png.c

index 8a9fef8fbd55bc2469cb23b2281678eca07e8636..af7c2d2981752cda6ff8fe9fc72e9c1c96d78289 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-06-13  7.0.8-1  <quetzlzacatenango@image...>
+  * PNG: set storage class to DirectClass if alpha enabled (reference
+    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=34121).
+
 2018-06-12  7.0.8-0 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.8-0, GIT revision 14459:d7c892d5a:20180612.
 
index fe14a93bfab9647203425a436df23be1230434b6..285daf8df45c70db96d605be5d2119b5174d25d8 100644 (file)
@@ -4036,6 +4036,8 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
         ((int) ping_color_type == PNG_COLOR_TYPE_GRAY_ALPHA) ||
         (png_get_valid(ping,ping_info,PNG_INFO_tRNS))) ?
         BlendPixelTrait : UndefinedPixelTrait;
+    if (image->alpha_trait == BlendPixelTrait)
+      (void) SetImageStorageClass(image,DirectClass,exception);
 
 #if 0  /* I'm not sure what's wrong here but it does not work. */
     if (image->alpha_trait != UndefinedPixelTrait)