From e8df2aa1909c140e8a78e01b868282a63d734d49 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Fri, 22 Dec 2017 02:09:45 +0100 Subject: [PATCH] Added extra check to fix issue with zero height. --- libvips/foreign/magicksave.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libvips/foreign/magicksave.c b/libvips/foreign/magicksave.c index 0a843030..a9a3c8cc 100644 --- a/libvips/foreign/magicksave.c +++ b/libvips/foreign/magicksave.c @@ -369,6 +369,9 @@ magick_create_images( Write *write ) vips_image_get_int( write->im, VIPS_META_PAGE_HEIGHT, &height ) ) return( magick_create_image( write, write->im ) ); + if( height == 0 ) + return( magick_create_image( write, write->im ) ); + for( int top=0; top < write->im->Ysize ; top+=height ) { VipsImage *im;