diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2020-07-06 16:09:36 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2020-07-06 16:09:36 +0100 |
commit | 8442a27c2bb8df48029ceea6e64c4930106a57fc (patch) | |
tree | 1c8829cbd31e254550cf4661f7adcbb16c9113b5 /include/libnsgif.h | |
parent | a937d161f6787ecc1c1bef9bad6039925ff13d72 (diff) | |
download | libnsgif-8442a27c2bb8df48029ceea6e64c4930106a57fc.tar.gz libnsgif-8442a27c2bb8df48029ceea6e64c4930106a57fc.tar.bz2 |
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
Diffstat (limited to 'include/libnsgif.h')
-rw-r--r-- | include/libnsgif.h | 9 |
1 files changed, 9 insertions, 0 deletions
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; /** |