Merge branch 'master' into reset-create
This commit is contained in:
commit
9cafae8767
@ -10,6 +10,8 @@
|
|||||||
* - add @page option, 0 by default
|
* - add @page option, 0 by default
|
||||||
* 25/11/16
|
* 25/11/16
|
||||||
* - add @n, deprecate @all_frames (just sets n = -1)
|
* - add @n, deprecate @all_frames (just sets n = -1)
|
||||||
|
* 8/9/17
|
||||||
|
* - don't cache magickload
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -95,6 +97,7 @@ vips_foreign_load_magick_class_init( VipsForeignLoadMagickClass *class )
|
|||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS( class );
|
GObjectClass *gobject_class = G_OBJECT_CLASS( class );
|
||||||
VipsObjectClass *object_class = (VipsObjectClass *) class;
|
VipsObjectClass *object_class = (VipsObjectClass *) class;
|
||||||
|
VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class );
|
||||||
VipsForeignClass *foreign_class = (VipsForeignClass *) class;
|
VipsForeignClass *foreign_class = (VipsForeignClass *) class;
|
||||||
VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class;
|
VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class;
|
||||||
|
|
||||||
@ -104,6 +107,10 @@ vips_foreign_load_magick_class_init( VipsForeignLoadMagickClass *class )
|
|||||||
object_class->nickname = "magickload_base";
|
object_class->nickname = "magickload_base";
|
||||||
object_class->description = _( "load with ImageMagick" );
|
object_class->description = _( "load with ImageMagick" );
|
||||||
|
|
||||||
|
/* Don't cache magickload: it can gobble up memory and disc.
|
||||||
|
*/
|
||||||
|
operation_class->flags = VIPS_OPERATION_NOCACHE;
|
||||||
|
|
||||||
/* We need to be well to the back of the queue since vips's
|
/* We need to be well to the back of the queue since vips's
|
||||||
* dedicated loaders are usually preferable.
|
* dedicated loaders are usually preferable.
|
||||||
*/
|
*/
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
* - invalidate operation on read error
|
* - invalidate operation on read error
|
||||||
* 8/7/17
|
* 8/7/17
|
||||||
* - fix DPI mixup, thanks Fosk
|
* - fix DPI mixup, thanks Fosk
|
||||||
|
* 9/9/17
|
||||||
|
* - limit max tile width to 30k pixels to prevent overflow in render
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -216,6 +218,7 @@ vips_foreign_load_svg_load( VipsForeignLoad *load )
|
|||||||
int tile_width;
|
int tile_width;
|
||||||
int tile_height;
|
int tile_height;
|
||||||
int n_lines;
|
int n_lines;
|
||||||
|
int max_tiles;
|
||||||
|
|
||||||
/* Use this to pick a tile height for our strip cache.
|
/* Use this to pick a tile height for our strip cache.
|
||||||
*/
|
*/
|
||||||
@ -231,12 +234,19 @@ vips_foreign_load_svg_load( VipsForeignLoad *load )
|
|||||||
NULL, vips_foreign_load_svg_generate, NULL, svg, NULL ) )
|
NULL, vips_foreign_load_svg_generate, NULL, svg, NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
/* Don't use tilecache to keep the number of calls to
|
/* librsvg starts to fail if any axis in a single render call is over
|
||||||
* rsvg_handle_render_cairo() low. Don't thread the cache, we rely on
|
* 32767. Use a tilecache so we can render very wide images, though we
|
||||||
* locking to keep rsvg single-threaded.
|
* set it up like a linecache.
|
||||||
|
*
|
||||||
|
* Don't thread the cache: we rely on this to keep calls to rsvg
|
||||||
|
* single-threaded.
|
||||||
*/
|
*/
|
||||||
if( vips_linecache( t[0], &t[1],
|
max_tiles = 3 * VIPS_ROUND_UP( t[0]->Xsize, 30000 ) / 30000;
|
||||||
|
if( vips_tilecache( t[0], &t[1],
|
||||||
|
"tile_width", 30000,
|
||||||
"tile_height", tile_height,
|
"tile_height", tile_height,
|
||||||
|
"max_tiles", max_tiles,
|
||||||
|
"access", VIPS_ACCESS_SEQUENTIAL,
|
||||||
NULL ) )
|
NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
if( vips_image_write( t[1], load->real ) )
|
if( vips_image_write( t[1], load->real ) )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user