colortype 4 or 6, or if the tRNS chunk is present, even when the image
is actually fully opaque.
colors into one (the background color), to reduce the compressed filesize.
* First try the 4-4-4 and 3-3-3 palettes instead of 3-3-2, to preserve
colors (especially gray) better, when reducing to PNG8.
+ * Force the PNG encoder to return image->matte==MagickTrue when the
+ format is RGBA or GA or if the tRNS chunk is present, even when the
+ image is fully opaque (reference
+ http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=18349).
2011-03-21 6.6.8-6 Cristy <quetzlzacatenango@image...>
* New version 6.6.8-6.
}
}
#endif
+
+ /* Set image->matte to MagickTrue if the input colortype supports
+ * alpha or if a valid tRNS chunk is present, no matter whether there
+ * is actual transparency present.
+ */
+ image->matte=(((int) ping_color_type == PNG_COLOR_TYPE_RGB_ALPHA) ||
+ ((int) ping_color_type == PNG_COLOR_TYPE_GRAY_ALPHA) ||
+ (png_get_valid(ping,ping_info,PNG_INFO_tRNS))) ?
+ MagickTrue : MagickFalse;
+
/*
Relinquish resources.
*/