summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gif.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gif.c b/src/gif.c
index e9048f9..7f960d1 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -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),