diff --git a/libvips/foreign/spngload.c b/libvips/foreign/spngload.c index 6d0ceda2..13cb2931 100644 --- a/libvips/foreign/spngload.c +++ b/libvips/foreign/spngload.c @@ -258,9 +258,9 @@ vips_foreign_load_png_set_header( VipsForeignLoadPng *png, VipsImage *image ) */ if( !png->unlimited && n_text > MAX_PNG_TEXT_CHUNKS ) { - vips_error( class->nickname, - "%s", _( "too many text chunks" ) ); - return( -1 ); + g_warning(_( "%d text chunks, only %d text chunks will be loaded" ), + n_text, MAX_PNG_TEXT_CHUNKS ); + n_text = MAX_PNG_TEXT_CHUNKS; } text = VIPS_ARRAY( VIPS_OBJECT( png ), diff --git a/libvips/foreign/vipspng.c b/libvips/foreign/vipspng.c index 57009967..7fb65c00 100644 --- a/libvips/foreign/vipspng.c +++ b/libvips/foreign/vipspng.c @@ -581,10 +581,9 @@ png2vips_header( Read *read, VipsImage *out ) */ if( !read->unlimited && num_text > MAX_PNG_TEXT_CHUNKS ) { - vips_error( "vipspng", - _( "%d text chunks, image blocked" ), - num_text ); - return( -1 ); + g_warning(_( "%d text chunks, only %d text chunks will be loaded" ), + num_text, MAX_PNG_TEXT_CHUNKS ); + num_text = MAX_PNG_TEXT_CHUNKS; } for( i = 0; i < num_text; i++ )