summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-04-12 16:22:27 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-04-12 16:22:38 +0200
commita987e66e6ba014795ba4540c5fedeb9894bdd94e (patch)
tree7ba3e873a2859b341fc43d307e117637c80705af
parent66189689ca2f22de47e1a83af1deb9b0bff29ab7 (diff)
downloademacs-a987e66e6ba014795ba4540c5fedeb9894bdd94e.tar.gz
Improve DISPOSE_PREVIOUS in gif_load slightly
* src/image.c (gif_load): Tweak how DISPOSE_PREVIOUS is handled. It's still not right, but it's less glaringly wrong.
-rw-r--r--src/image.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c
index 530819eab9d..45de7ae83d3 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9115,6 +9115,14 @@ gif_load (struct frame *f, struct image *img)
if (disposal == DISPOSAL_UNSPECIFIED)
disposal = DISPOSE_DO_NOT;
+ /* This is not quite correct -- the specification is unclear,
+ but I think we're supposed to restore to the frame before the
+ previous frame? And we don't have that data at this point.
+ But DISPOSE_DO_NOT is less wrong than substituting the
+ background, so do that for now. */
+ if (disposal == DISPOSE_PREVIOUS)
+ disposal = DISPOSE_DO_NOT;
+
gif_color_map = subimage->ImageDesc.ColorMap;
if (!gif_color_map)
gif_color_map = gif->SColorMap;