libpng: Update to 1.6.51

This commit is contained in:
Jakub Marcowski
2025-06-30 11:59:44 +02:00
parent 9dd6c4dbac
commit 2b3501923f
14 changed files with 282 additions and 226 deletions

View File

@@ -2173,8 +2173,7 @@ png_image_write_main(png_voidp argument)
* before it is written. This only applies when the input is 16-bit and
* either there is an alpha channel or it is converted to 8-bit.
*/
if ((linear != 0 && alpha != 0 ) ||
(colormap == 0 && display->convert_to_8bit != 0))
if (linear != 0 && (alpha != 0 || display->convert_to_8bit != 0))
{
png_bytep row = png_voidcast(png_bytep, png_malloc(png_ptr,
png_get_rowbytes(png_ptr, info_ptr)));