From 8442a27c2bb8df48029ceea6e64c4930106a57fc Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 6 Jul 2020 16:09:36 +0100 Subject: Disposal Method: Handle Restore to previous with saved image. Previously we decoded a previous frame over the current frame data to handle resoration. However, the previous frame depended on its own previous frame state for correct decode. Now we just make a copy of the previous frame data and copy it back to handle the GIF_FRAME_RESTORE case. See: https://github.com/libvips/libvips/issues/1084#issuecomment-653497200 --- include/libnsgif.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/libnsgif.h') diff --git a/include/libnsgif.h b/include/libnsgif.h index a819fec..50dc688 100644 --- a/include/libnsgif.h +++ b/include/libnsgif.h @@ -136,6 +136,15 @@ typedef struct gif_animation { unsigned int *global_colour_table; /** local colour table */ unsigned int *local_colour_table; + + /** previous frame for GIF_FRAME_RESTORE */ + void *prev_frame; + /** previous frame index */ + int prev_index; + /** previous frame width */ + unsigned prev_width; + /** previous frame height */ + unsigned prev_height; } gif_animation; /** -- cgit v1.2.3