diff options
author | Brett <6075681+developerbmw@users.noreply.github.com> | 2022-02-07 18:57:24 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 12:57:24 +0700 |
commit | 5c8d8d115984bc12ac98ec4c294c95483a721f1c (patch) | |
tree | ec9cd98fa5a3b3d63721835b2b44f8193361fe52 | |
parent | 09d5a6ad83888a352fc6058a478e7e1b1d48a7f6 (diff) | |
download | libgd-5c8d8d115984bc12ac98ec4c294c95483a721f1c.tar.gz |
enable interlace transform when reading png (#823)
-rw-r--r-- | src/gd_png.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gd_png.c b/src/gd_png.c index 4d8d49f..58c9682 100644 --- a/src/gd_png.c +++ b/src/gd_png.c @@ -415,6 +415,11 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtx * infile) goto error; } + /* enable the interlace transform if supported */ +#ifdef PNG_READ_INTERLACING_SUPPORTED + (void)png_set_interlace_handling(png_ptr); +#endif + png_read_update_info (png_ptr, info_ptr); /* allocate space for the PNG image data */ |