From fcc790f6c0fc9dc036157ef2eea6a5bb8161c60b Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 20 Nov 2014 13:28:17 +0000 Subject: [PATCH] better tiled tiff tilecache on write --- libvips/foreign/vips2tiff.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libvips/foreign/vips2tiff.c b/libvips/foreign/vips2tiff.c index e567ce84..e1d477e3e 100644 --- a/libvips/foreign/vips2tiff.c +++ b/libvips/foreign/vips2tiff.c @@ -1385,15 +1385,16 @@ make_tiff_write( VipsImage *im, const char *filename, else tw->tls = VIPS_IMAGE_SIZEOF_PEL( im ) * tw->tilew; - /* If we will be writing tiles, we need to cache tileh pixels of the + /* If we will be writing tiles, we need to cache tileh lines of the * input, since we say we're sequential. */ if( tw->tile ) { if( vips_tilecache( tw->im, &tw->cache, "tile_width", tw->im->Xsize, - "tile_height", tw->tileh, - "max_tiles", 1, - NULL ) ) + "tile_height", 1, + "max_tiles", 2 * tw->tileh, + "threaded", TRUE, + NULL ) ) return( NULL ); tw->im = tw->cache;