Get a frame's colour table.
Sets up gif->colour_table for the frame.
1153{
1156 fl::size len = gif->
buf + gif->
buf_len - data;
1157 fl::size used_bytes;
1158
1159 FL_ASSERT(gif !=
nullptr,
"GIF object required");
1160 FL_ASSERT(frame !=
nullptr,
"Frame object required");
1161
1165 }
1166
1167 if (decode == false) {
1169 }
1170
1174 data, len, &used_bytes, decode);
1176 return ret;
1177 }
1179
1180 if (decode) {
1182 } else {
1184 }
1185
1187}
#define FL_ASSERT(x, MSG)
nsgif_error
LibNSGIF return codes.
static nsgif_error nsgif__colour_table_extract(fl::u32 colour_table[NSGIF_MAX_COLOURS], const struct nsgif_colour_layout *layout, fl::size colour_table_entries, const fl::u8 *data, fl::size data_len, fl::size *used, bool decode) FL_NOEXCEPT
Extract a GIF colour table into a LibNSGIF colour table buffer.
bool local_palette
whether the frame has a local colour table
fl::u32 global_colour_table[NSGIF_MAX_COLOURS]
global colour table
fl::u32 * colour_table
current colour table
fl::u32 colour_table_offset
offset to frame colour table
fl::size buf_len
total number of bytes of GIF data available
struct nsgif_colour_layout colour_layout
Client's colour component order.
struct nsgif_frame_info info
const fl::u8 * buf
pointer to GIF data
fl::u32 local_colour_table[NSGIF_MAX_COLOURS]
local colour table
#define NSGIF_COLOUR_TABLE_SIZE_MASK
#define NSGIF_COLOUR_TABLE_MASK