FastLED 3.9.15
Loading...
Searching...
No Matches

◆ nsgif_global_palette()

void fl::third_party::nsgif_global_palette ( const nsgif_t * gif,
fl::u32 table[NSGIF_MAX_COLOURS],
fl::size * entries )

Get the global colour palette.

If the GIF has no global colour table, this will return the default colour palette.

Colours in same pixel format as nsgif_bitmap_t.

Parameters
[in]gifThe nsgif_t object.
[out]tableClient buffer to hold the colour table.
[out]entriesThe number of used entries in the colour table.

Definition at line 2008 of file gif.cpp.hpp.

2012{
2013 fl::size len = sizeof(*table) * NSGIF_MAX_COLOURS;
2014
2015 fl::memcpy(table, gif->global_colour_table, len);
2016 *entries = gif->colour_table_size;
2017}
fl::u32 colour_table_size
size of global colour table (in entries)
Definition gif.cpp.hpp:122
fl::u32 global_colour_table[NSGIF_MAX_COLOURS]
global colour table
Definition gif.cpp.hpp:129
void * memcpy(void *dest, const void *src, size_t n) FL_NOEXCEPT
#define NSGIF_MAX_COLOURS
Maximum colour table size.
Definition nsgif.hpp:29

References FL_NOEXCEPT, fl::memcpy(), and NSGIF_MAX_COLOURS.

+ Here is the call graph for this function: