[−][src]Module gift::block
A GIF file consists of a sequence of Blocks in a specific order.
With some minor exceptions, the order is thus:
- Header
- LogicalScreenDesc
- GlobalColorTable (optional)
- Application - animation loop count (optional)
- Comment (optional)
- Sequence of Frames, which are:
- GraphicControl (optional)
- ImageDesc
- LocalColorTable (optional)
- ImageData
- Trailer
Structs
Application | The application extension block is typically only used to enable looping animation. Other uses are ignored by most GIF readers. |
ColorTableConfig | A color table configuration defines the size and ordering of a color table. |
Comment | A comment extension block contains unstructured file metadata. The specification recommends using the ASCII encoding. |
Frame | A single frame of a GIF animation. |
GlobalColorTable | The global color table, if present, is used for all frames which do not define a LocalColorTable. |
GraphicControl | The graphic control extension block contains animation parameters for one frame. |
Header | The header contains the magic string "GIF", followed by a version number. |
ImageData | An image data block contains image data for one frame. |
ImageDesc | The image descriptor block contains properties which apply to one frame. |
LocalColorTable | The local color table, if present, must immediately follow an image descriptor block. |
LogicalScreenDesc | The logical screen descriptor contains properties which apply to all frames in the file. |
PlainText | The plain text extension block is an obsolete GIF feature. |
Preamble | The preamble blocks are the first few blocks in a GIF file, before any frames. |
Trailer | The trailer block indicates the end of a GIF file. |
Unknown | Unknown extension blocks should not exist, but might be generated by non-standard encoders. |
Enums
Block | A block within a GIF file. |
ColorTableExistence | Configuration setting indicating the presence or absence of a color table |
ColorTableOrdering | Configuration setting indicating whether the color table is ordered |
DisposalMethod | Method to dispose of a frame in an animation |