From 0ade2e972fc7922c308982796ee6f5ffb5b41557 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 5 Dec 2017 08:38:52 +0000 Subject: [PATCH] reenable png interlace test reenable png interlace test after the fix in https://github.com/jcupitt/libvips/pull/821 --- libvips/foreign/vipspng.c | 5 +++++ test/test_formats.sh | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) 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