Module gift::block

source ·
Expand description

A GIF file consists of a sequence of Blocks in a specific order.

With some minor exceptions, the order is thus:

Structs

  • The application extension block is typically only used to enable looping animation. Other uses are ignored by most GIF readers.
  • A color table configuration defines the size and ordering of a color table.
  • A comment extension block contains unstructured file metadata.
  • A single frame of a GIF animation.
  • The global color table, if present, is used for all frames which do not define a LocalColorTable.
  • The graphic control extension block contains animation parameters for one frame.
  • The header contains the magic string “GIF”, followed by a version number.
  • An image data block contains image data for one frame.
  • The image descriptor block contains properties which apply to one frame.
  • The local color table, if present, must immediately follow an image descriptor block.
  • The logical screen descriptor contains properties which apply to all frames in the file.
  • The plain text extension block is an obsolete GIF feature.
  • The preamble blocks are the first few blocks in a GIF file, before any frames.
  • The trailer block indicates the end of a GIF file.
  • Unknown extension blocks should not exist, but might be generated by non-standard encoders.

Enums