fix setting of iterations in magicksave
ImageMagick uses 0 to mean unset, so we must always add 1. See coders/gif.c. See https://github.com/libvips/libvips/issues/1302
This commit is contained in:
parent
efadb5dc42
commit
53b43e0497
@ -143,9 +143,12 @@ vips_foreign_save_magick_next_image( VipsForeignSaveMagick *magick )
|
||||
!vips_image_get_int( im, "gif-delay", &number ) )
|
||||
image->delay = (size_t) number;
|
||||
|
||||
/* ImageMagick uses 0 to mean unset, so we must always add 1. See
|
||||
* coders/gif.c.
|
||||
*/
|
||||
if( vips_image_get_typeof( im, "gif-loop" ) &&
|
||||
!vips_image_get_int( im, "gif-loop", &number ) )
|
||||
image->iterations = (size_t) number;
|
||||
image->iterations = (size_t) (number + 1);
|
||||
|
||||
if( vips_image_get_typeof( im, "gif-comment" ) &&
|
||||
!vips_image_get_string( im, "gif-comment", &str ) )
|
||||
|
Loading…
Reference in New Issue
Block a user