From 9420911ba87c343dd3d592c7c88e3c872cf99cb4 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 18 Dec 2021 18:08:30 +0000 Subject: [PATCH] change default GIF frame delay from 1s to 0.1s This is the delay if the GCB is missing. See https://github.com/libvips/libvips/issues/2582 --- ChangeLog | 1 + libvips/foreign/libnsgif/default-frame-delay.patch | 11 +++++++++++ libvips/foreign/libnsgif/libnsgif.c | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 libvips/foreign/libnsgif/default-frame-delay.patch diff --git a/ChangeLog b/ChangeLog index 033cfea6..51827126 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ - win: don't set create time on inappropriate file descriptors [lovell] - fall back to magicksave for gif if cgif is not present [erik-frontify] - fix a crash with 0 length vectors +- change default frame delay for GIFs from 1s to 0.1s 21/11/21 started 8.12.1 - fix insert [chregu] diff --git a/libvips/foreign/libnsgif/default-frame-delay.patch b/libvips/foreign/libnsgif/default-frame-delay.patch new file mode 100644 index 00000000..6e534f05 --- /dev/null +++ b/libvips/foreign/libnsgif/default-frame-delay.patch @@ -0,0 +1,11 @@ +--- libnsgif.orig.c 2021-12-18 17:58:43.829719505 +0000 ++++ libnsgif.c 2021-12-18 17:58:47.773783438 +0000 +@@ -1003,7 +1003,7 @@ + frame->frame_pointer = gif->buffer_position; + frame->redraw_required = false; + frame->disposal_method = 0; +- frame->frame_delay = 100; ++ frame->frame_delay = 10; + frame->display = false; + frame->virgin = true; + } diff --git a/libvips/foreign/libnsgif/libnsgif.c b/libvips/foreign/libnsgif/libnsgif.c index 5d1252cb..6703c2bb 100644 --- a/libvips/foreign/libnsgif/libnsgif.c +++ b/libvips/foreign/libnsgif/libnsgif.c @@ -295,7 +295,7 @@ static gif_result gif_initialise_frame(gif_animation *gif) gif->frames[frame].virgin = true; gif->frames[frame].disposal_method = 0; gif->frames[frame].transparency = false; - gif->frames[frame].frame_delay = 100; + gif->frames[frame].frame_delay = 10; gif->frames[frame].redraw_required = false; /* Invalidate any previous decoding we have of this frame */