mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[master] Port change to pngrtran.c from 1.5.3: when expanding a paletted image,
always expand to RGBA if transparency is present.
This commit is contained in:
@@ -1181,8 +1181,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
{
|
||||
if (png_ptr->num_trans &&
|
||||
(png_ptr->transformations & PNG_EXPAND_tRNS))
|
||||
if (png_ptr->num_trans)
|
||||
info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
|
||||
else
|
||||
info_ptr->color_type = PNG_COLOR_TYPE_RGB;
|
||||
|
||||
Reference in New Issue
Block a user