summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2021-01-05 11:05:29 +1300
committerRobert Ancell <robert.ancell@canonical.com>2021-01-05 11:05:29 +1300
commit8a5c7cf85dc80910d993a5eeaae9b2e61677bb23 (patch)
tree989334b69be987c6cefd906a186b05796bf8e849 /gdk-pixbuf
parent30598a526e7c51bd26431d147984cc32e32bcebe (diff)
downloadgdk-pixbuf-8a5c7cf85dc80910d993a5eeaae9b2e61677bb23.tar.gz
gif: Honor "revert to previous" behaviour on the first frame.
The code originally failed to load GIFs that had this set (4607c8e9) and then changed to silently ignoring it (af71489c). Reverting to the background on the first frame seems completely reasonable and is the behaviour of Firefox/Chrome. The [current GIF spec](https://www.w3.org/Graphics/GIF/spec-gif89a.txt) doesn't indicate any issue doing this and it matches what Firefox/Chrome does. Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/166
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/io-gif.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c
index 64a492a58..1befba155 100644
--- a/gdk-pixbuf/io-gif.c
+++ b/gdk-pixbuf/io-gif.c
@@ -623,14 +623,6 @@ gif_get_frame_info (GifContext *context)
context->x_offset = LM_to_uint (buf[0], buf[1]);
context->y_offset = LM_to_uint (buf[2], buf[3]);
- if (context->animation->frames == NULL &&
- context->disposal == 3) {
- /* First frame can't have "revert to previous" as its
- * dispose mode. Silently use "retain" instead.
- */
- context->disposal = 0;
- }
-
context->frame_interlace = BitSet (buf[8], INTERLACE);
#ifdef DUMP_IMAGE_DETAILS