From 8a34ba6e14af73800fc60829f173b4a41e7cbebd Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 4 Dec 2017 21:47:52 +0000 Subject: [PATCH] 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. --- libvips/foreign/vipspng.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libvips/foreign/vipspng.c b/libvips/foreign/vipspng.c index b685b3d8..df97a05b 100644 --- a/libvips/foreign/vipspng.c +++ b/libvips/foreign/vipspng.c @@ -484,11 +484,6 @@ png2vips_interlace( Read *read, VipsImage *out ) for( y = 0; y < out->Ysize; 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_end( read->pPng, NULL );