Merge branch 'libpng16' of https://github.com/jbowler/libpng-1 into libpng16

This commit is contained in:
Glenn Randers-Pehrson 2015-10-30 12:48:07 -05:00
commit 305ada6672

View File

@ -2097,10 +2097,10 @@ png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)
defined(PNG_READ_USER_TRANSFORM_SUPPORTED) defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
if ((png_ptr->transformations & PNG_USER_TRANSFORM) != 0) if ((png_ptr->transformations & PNG_USER_TRANSFORM) != 0)
{ {
if (info_ptr->bit_depth < png_ptr->user_transform_depth) if (png_ptr->user_transform_depth != 0)
info_ptr->bit_depth = png_ptr->user_transform_depth; info_ptr->bit_depth = png_ptr->user_transform_depth;
if (info_ptr->channels < png_ptr->user_transform_channels) if (png_ptr->user_transform_channels != 0)
info_ptr->channels = png_ptr->user_transform_channels; info_ptr->channels = png_ptr->user_transform_channels;
} }
#endif #endif