Parse the graphic control extension.
760{
761 enum {
762 GIF_MASK_TRANSPARENCY = 0x01,
763 GIF_MASK_DISPOSAL = 0x1c,
764 };
765
766
767
768
769
770
771
772
773
774
775
776
777
778 if (len < 6) {
780 }
781
782 frame->
info.
delay = data[3] | (data[4] << 8);
783
784 if (data[2] & GIF_MASK_TRANSPARENCY) {
787 }
788
789 frame->
info.
disposal = ((data[2] & GIF_MASK_DISPOSAL) >> 2);
790
791
792
793
794
795
798 }
799
800
801
805
807}
@ NSGIF_ERR_END_OF_DATA
Unexpected end of GIF source data.
@ NSGIF_DISPOSAL_RESTORE_BG
Clear frame to background colour.
@ NSGIF_DISPOSAL_RESTORE_PREV
Restore previous frame.
@ NSGIF_DISPOSAL_RESTORE_QUIRK
Alias for NSGIF_DISPOSAL_RESTORE_PREV.
bool redraw_required
whether a full image redraw is required
bool transparency
whether the frame may have transparency
fl::u32 delay
delay (in cs) before animating the frame
fl::u32 transparency_index
the index designating a transparent pixel
struct nsgif_frame_info info
fl::u8 disposal
Disposal method for previous frame; affects plotting.