From a649ae111d88c93b3bef72cbb873c730623944d3 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 11 Dec 2015 12:35:12 +0000 Subject: [PATCH] make join use a bit less stack helps us join slightly larger image arrays --- libvips/conversion/join.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/libvips/conversion/join.c b/libvips/conversion/join.c index e2d39e1a..4b8a03b6 100644 --- a/libvips/conversion/join.c +++ b/libvips/conversion/join.c @@ -193,14 +193,19 @@ vips_join_build( VipsObject *object ) return( 0 ); } - if( vips_extract_area( t, &t2, - left, top, width, height, NULL ) ) { + if( left != 0 || + top != 0 || + width != t->Xsize || + height != t->Ysize ) { + if( vips_extract_area( t, &t2, + left, top, width, height, NULL ) ) { + g_object_unref( t ); + return( -1 ); + } g_object_unref( t ); - return( -1 ); - } - g_object_unref( t ); - t = t2; + t = t2; + } } if( vips_image_write( t, conversion->out ) ) {