another missing copy operation

The --page-height arg to savers needs a copy as well.
This commit is contained in:
John Cupitt 2020-01-29 15:44:55 +00:00
parent 165a3a3855
commit 2e3eca7e29
1 changed files with 11 additions and 1 deletions

View File

@ -1640,9 +1640,19 @@ vips_foreign_save_build( VipsObject *object )
save->background ) )
return( -1 );
if( save->page_height )
if( save->page_height ) {
VipsImage *x;
if( vips_copy( ready, &x, NULL ) ) {
VIPS_UNREF( ready );
return( -1 );
}
VIPS_UNREF( ready );
ready = x;
vips_image_set_int( ready,
VIPS_META_PAGE_HEIGHT, save->page_height );
}
VIPS_UNREF( save->ready );
save->ready = ready;