diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-05-08 16:17:58 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2022-05-08 16:17:58 +0100 |
commit | 5a1c0ed3ba4534957965839fda659482603117e2 (patch) | |
tree | e01dc752da32a7174b163205f9bd26686392ffca | |
parent | 50b3f3b46903281c5507786b5f65118dca5139a5 (diff) | |
download | libnsgif-5a1c0ed3ba4534957965839fda659482603117e2.tar.gz libnsgif-5a1c0ed3ba4534957965839fda659482603117e2.tar.bz2 |
GIF: Store frame palette offset.
-rw-r--r-- | src/gif.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -43,6 +43,9 @@ typedef struct nsgif_frame { /** the index designating a transparent pixel */ uint32_t transparency_index; + /** offset to frame colour table */ + uint32_t colour_table_offset; + /* Frame flags */ uint32_t flags; } nsgif_frame; @@ -1130,6 +1133,10 @@ static nsgif_error nsgif__parse_colour_table( return NSGIF_OK; } + if (decode == false) { + frame->colour_table_offset = *pos - gif->buf; + } + ret = nsgif__colour_table_extract( gif->local_colour_table, &gif->colour_layout, 2 << (frame->flags & NSGIF_COLOUR_TABLE_SIZE_MASK), |