[devel] turn on interlace handling in png_read_png
This commit is contained in:
parent
c83d421d9e
commit
6a6d79fc00
@ -1311,7 +1311,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
|||||||
{
|
{
|
||||||
int row;
|
int row;
|
||||||
|
|
||||||
if (png_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* png_read_info() gives us all of the information from the
|
/* png_read_info() gives us all of the information from the
|
||||||
@ -1426,6 +1426,11 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
|||||||
|
|
||||||
/* We don't handle adding filler bytes */
|
/* We don't handle adding filler bytes */
|
||||||
|
|
||||||
|
/* We use png_read_image and rely on that for interlace handling, but we also
|
||||||
|
* call png_read_update_info therefore must turn on interlace handling now:
|
||||||
|
*/
|
||||||
|
(void)png_set_interlace_handling(png_ptr);
|
||||||
|
|
||||||
/* Optional call to gamma correct and add the background to the palette
|
/* Optional call to gamma correct and add the background to the palette
|
||||||
* and update info structure. REQUIRED if you are expecting libpng to
|
* and update info structure. REQUIRED if you are expecting libpng to
|
||||||
* update the palette for you (i.e., you selected such a transform above).
|
* update the palette for you (i.e., you selected such a transform above).
|
||||||
|
Loading…
Reference in New Issue
Block a user