Attempts to initialise the next frame.
1327{
1332
1334 if (frame == nullptr) {
1336 }
1337
1339
1340 if (decode) {
1342
1343
1346 }
1347
1348
1351 }
1352
1353
1356 }
1357 } else {
1359
1360
1363 }
1364 }
1365
1368 goto cleanup;
1369 }
1370
1373 goto cleanup;
1374 }
1375
1378 goto cleanup;
1379 }
1380
1383 goto cleanup;
1384 }
1385
1386cleanup:
1387 if (!decode) {
1389 }
1390
1391 return ret;
1392}
static nsgif_error nsgif__parse_image_descriptor(struct nsgif *gif, struct nsgif_frame *frame, const fl::u8 **pos, bool decode) FL_NOEXCEPT
Parse a GIF Image Descriptor.
nsgif_error
LibNSGIF return codes.
@ NSGIF_ERR_OOM
Out of memory error.
@ NSGIF_ERR_END_OF_DATA
Unexpected end of GIF source data.
static nsgif_error nsgif__parse_frame_extensions(struct nsgif *gif, struct nsgif_frame *frame, const fl::u8 **pos, bool decode) FL_NOEXCEPT
Parse the frame's extensions.
static nsgif_error nsgif__parse_image_data(struct nsgif *gif, struct nsgif_frame *frame, const fl::u8 **pos, bool decode) FL_NOEXCEPT
Parse the image data for a gif frame.
static struct nsgif_frame * nsgif__get_frame(struct nsgif *gif, fl::u32 frame_idx) FL_NOEXCEPT
static nsgif_error nsgif__parse_colour_table(struct nsgif *gif, struct nsgif_frame *frame, const fl::u8 **pos, bool decode) FL_NOEXCEPT
Get a frame's colour table.
fl::size frame_offset
offset (in bytes) to the GIF frame data
fl::u32 decoded_frame
current frame decoded to bitmap
bool display
whether the frame should be displayed/animated
fl::size buf_pos
current index into GIF data
fl::size buf_len
total number of bytes of GIF data available
fl::u32 frame_count_partial
number of frames partially decoded
struct nsgif_frame_info info
const fl::u8 * buf
pointer to GIF data
constexpr T * end(T(&array)[N]) FL_NOEXCEPT