Merge branch '8.13'

This commit is contained in:
John Cupitt 2022-09-21 19:09:44 +01:00
commit 1f8e547d99
2 changed files with 11 additions and 9 deletions

View File

@ -21,6 +21,7 @@ master
- fix null string in buffer print [pclewis]
- revise caching of seq mode loaders [jcupitt]
- reduce latency on dzsave kill [kleisauke]
- improve text too large check [kleisauke]
24/7/22 started 8.13.1
- fix im7 feature detection in meson

View File

@ -348,6 +348,7 @@ vips_text_build( VipsObject *object )
VipsImage *image;
cairo_surface_t *surface;
cairo_t *cr;
cairo_status_t status;
if( VIPS_OBJECT_CLASS( vips_text_parent_class )->build( object ) )
return( -1 );
@ -417,15 +418,6 @@ vips_text_build( VipsObject *object )
return( -1 );
}
/* Cairo can't go over 32k pixels.
*/
if( extents.width >= 32768 ||
extents.height >= 32768 ) {
vips_error( class->nickname,
"%s", _( "text image too large" ) );
return( -1 );
}
image = t[0] = vips_image_new_memory();
vips_image_init_fields( image,
extents.width, extents.height, 4,
@ -444,6 +436,15 @@ vips_text_build( VipsObject *object )
CAIRO_FORMAT_ARGB32,
image->Xsize, image->Ysize,
VIPS_IMAGE_SIZEOF_LINE( image ) );
status = cairo_surface_status( surface );
if( status ) {
cairo_surface_destroy( surface );
vips_error( class->nickname,
"%s", cairo_status_to_string( status ) );
return( -1 );
}
cr = cairo_create( surface );
cairo_surface_destroy( surface );