Merge branch 'master' of github.com:libvips/libvips

This commit is contained in:
John Cupitt 2022-05-16 14:30:41 +01:00
commit 793d3116a7
2 changed files with 6 additions and 7 deletions

View File

@ -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 ),

View File

@ -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++ )