diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2021-11-02 19:04:01 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2021-11-02 19:04:01 +0000 |
commit | 41f33c7495e7b83b40a93e4a76481d770f0c5f7b (patch) | |
tree | dbe9ac31a49cc3a821d15b077868b2c4d1a00d5c /include | |
parent | 42cfb0d9a5b4e6dbf0981262916e160be438157b (diff) | |
download | libnsgif-41f33c7495e7b83b40a93e4a76481d770f0c5f7b.tar.gz |
GIF: Change background colour handling.
We used to memset a colour we looked up in the colour table when
clearing the previous frame. This didn't make sense, because the
colour is four bytes wide. Now we write the actual colour in
properly.
Also, the background color comes from the global colour table
(if one exists), rather than from the local colour table. If
there is no colour table, black is used.
Diffstat (limited to 'include')
-rw-r--r-- | include/libnsgif.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/libnsgif.h b/include/libnsgif.h index 81a67b5..a11c3a5 100644 --- a/include/libnsgif.h +++ b/include/libnsgif.h @@ -126,8 +126,10 @@ typedef struct gif_animation { unsigned int buffer_size; /** current number of frame holders */ unsigned int frame_holders; - /** index in the colour table for the background colour */ - unsigned int background_index; + /** background index */ + unsigned int bg_index; + /** background colour */ + unsigned int bg_colour; /** image aspect ratio (ignored) */ unsigned int aspect_ratio; /** size of colour table (in entries) */ |