diff --git a/libvips/foreign/vipspng.c b/libvips/foreign/vipspng.c index df97a05b..7952383b 100644 --- a/libvips/foreign/vipspng.c +++ b/libvips/foreign/vipspng.c @@ -484,6 +484,11 @@ png2vips_interlace( Read *read, VipsImage *out ) for( y = 0; y < out->Ysize; y++ ) read->row_pointer[y] = VIPS_IMAGE_ADDR( out, 0, y ); + /* Some libpng warn you to call png_set_interlace_handling(); here, but + * that can actually break interlace. We have to live with the warning, + * unfortunately. + */ + png_read_image( read->pPng, read->row_pointer ); png_read_end( read->pPng, NULL ); diff --git a/test/test_formats.sh b/test/test_formats.sh index 52b075f7..abaa5241 100755 --- a/test/test_formats.sh +++ b/test/test_formats.sh @@ -196,8 +196,7 @@ if test_supported tiffload; then fi if test_supported pngload; then test_format $image png 0 -# sadly broken in libpng 1.6.28 and 29 -# test_format $image png 0 [compression=9,interlace=1] + test_format $image png 0 [compression=9,interlace=1] fi if test_supported jpegload; then test_format $image jpg 90