Read Logical Screen Descriptor.
7-byte Logical Screen Descriptor is:
+0 SHORT Logical Screen Width +2 SHORT Logical Screen Height +4 CHAR Packed Fields 1BIT Global Colour Table Flag 3BITS Colour Resolution 1BIT Sort Flag 3BITS Size of Global Colour Table +5 CHAR Background Colour Index +6 CHAR Pixel Aspect Ratio
- Parameters
-
| [in] | gif | The GIF object we're decoding. |
| [in,out] | pos | The current buffer position, updated on success. |
- Returns
- NSGIF_OK on success, appropriate error otherwise.
Definition at line 1592 of file gif.cpp.hpp.
1595{
1597 fl::size len = gif->
buf + gif->
buf_len - data;
1598
1599 if (len < 7) {
1601 }
1602
1603 gif->
info.
width = data[0] | (data[1] << 8);
1610
1613}
@ NSGIF_ERR_END_OF_DATA
Unexpected end of GIF source data.
fl::u32 colour_table_size
size of global colour table (in entries)
fl::u32 aspect_ratio
image aspect ratio (ignored)
int loop_max
number of times to play animation (zero means loop forever)
fl::u32 width
width of GIF (may increase during decoding)
fl::u32 height
height of GIF (may increase during decoding)
fl::size buf_len
total number of bytes of GIF data available
bool global_palette
whether the GIF has a global colour table
fl::u32 bg_index
background index
const fl::u8 * buf
pointer to GIF data
#define NSGIF_COLOUR_TABLE_SIZE_MASK
#define NSGIF_COLOUR_TABLE_MASK
References FL_NOEXCEPT, NSGIF_COLOUR_TABLE_MASK, NSGIF_COLOUR_TABLE_SIZE_MASK, NSGIF_ERR_END_OF_DATA, NSGIF_OK, and pos.
Referenced by nsgif_data_scan().