Ensure interlaced PNG input works with libpng16

Manually calling png_set_interlace_handling results in the internal
num_rows member of the opaque png_structp not being correctly set.

This appears to be a limitation of libpng so probably needs fixing
upstream before the png_set_interlace_handling call can be re-added.
This commit is contained in:
Lovell Fuller 2017-12-04 21:47:52 +00:00
parent dcf8588b97
commit 8a34ba6e14

View File

@ -484,11 +484,6 @@ png2vips_interlace( Read *read, VipsImage *out )
for( y = 0; y < out->Ysize; y++ ) for( y = 0; y < out->Ysize; y++ )
read->row_pointer[y] = VIPS_IMAGE_ADDR( out, 0, y ); read->row_pointer[y] = VIPS_IMAGE_ADDR( out, 0, y );
/* With some libpng you get a warning unless you call this, even though
* it's unnecessary.
*/
png_set_interlace_handling( read->pPng );
png_read_image( read->pPng, read->row_pointer ); png_read_image( read->pPng, read->row_pointer );
png_read_end( read->pPng, NULL ); png_read_end( read->pPng, NULL );