aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-04-12 16:22:27 +0200
committerLars Ingebrigtsen2022-04-12 16:22:38 +0200
commita987e66e6ba014795ba4540c5fedeb9894bdd94e (patch)
tree7ba3e873a2859b341fc43d307e117637c80705af /src
parent66189689ca2f22de47e1a83af1deb9b0bff29ab7 (diff)
downloademacs-a987e66e6ba014795ba4540c5fedeb9894bdd94e.tar.gz
emacs-a987e66e6ba014795ba4540c5fedeb9894bdd94e.zip
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.
Diffstat (limited to 'src')
-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)
9115 if (disposal == DISPOSAL_UNSPECIFIED) 9115 if (disposal == DISPOSAL_UNSPECIFIED)
9116 disposal = DISPOSE_DO_NOT; 9116 disposal = DISPOSE_DO_NOT;
9117 9117
9118 /* This is not quite correct -- the specification is unclear,
9119 but I think we're supposed to restore to the frame before the
9120 previous frame? And we don't have that data at this point.
9121 But DISPOSE_DO_NOT is less wrong than substituting the
9122 background, so do that for now. */
9123 if (disposal == DISPOSE_PREVIOUS)
9124 disposal = DISPOSE_DO_NOT;
9125
9118 gif_color_map = subimage->ImageDesc.ColorMap; 9126 gif_color_map = subimage->ImageDesc.ColorMap;
9119 if (!gif_color_map) 9127 if (!gif_color_map)
9120 gif_color_map = gif->SColorMap; 9128 gif_color_map = gif->SColorMap;