better error msg in magicksave
This commit is contained in:
parent
489810989e
commit
2ad29ed09e
@ -287,10 +287,17 @@ int
|
||||
magick_set_image_size( Image *image, const size_t width, const size_t height,
|
||||
ExceptionInfo *exception )
|
||||
{
|
||||
(void) exception;
|
||||
#ifdef HAVE_SETIMAGEEXTENT
|
||||
return( SetImageExtent( image, width, height ) );
|
||||
int result = SetImageExtent( image, width, height );
|
||||
|
||||
/* IM6 sets the exception on the image.
|
||||
*/
|
||||
if( !result )
|
||||
magick_inherit_exception( exception, image );
|
||||
|
||||
return( result );
|
||||
#else /*!HAVE_SETIMAGEEXTENT*/
|
||||
(void) exception;
|
||||
image->columns = width;
|
||||
image->rows = height;
|
||||
|
||||
|
@ -149,8 +149,10 @@ vips_foreign_save_magick_next_image( VipsForeignSaveMagick *magick )
|
||||
}
|
||||
|
||||
if( !magick_set_image_size( image,
|
||||
im->Xsize, magick->page_height, magick->exception ) )
|
||||
im->Xsize, magick->page_height, magick->exception ) ) {
|
||||
magick_vips_error( class->nickname, magick->exception );
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
/* Delay must be converted from milliseconds into centiseconds
|
||||
* as GIF image requires centiseconds.
|
||||
|
Loading…
Reference in New Issue
Block a user