Skip to content

Commit 0052af2

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: Fixed libpng warning when loading interlaced images
2 parents 2d579a1 + 4a630e6 commit 0052af2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/gd/libgd/gd_png.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,11 @@ gdImagePtr gdImageCreateFromPngCtx (gdIOCtx * infile)
336336
break;
337337
}
338338

339+
/* enable the interlace transform if supported */
340+
#ifdef PNG_READ_INTERLACING_SUPPORTED
341+
(void)png_set_interlace_handling(png_ptr);
342+
#endif
343+
339344
png_read_update_info(png_ptr, info_ptr);
340345

341346
/* allocate space for the PNG image data */

0 commit comments

Comments
 (0)