GIF
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
GIF Image Preview.
At a glance
| Original creator | CompuServe |
| First published | 1987 |
| Purpose | Palette-based raster images (256 colours or fewer) with LZW compression, optional interlacing and short animations. |
| Extensions | .gif |
| Poka parser | poka-gif |
| Viewer | poka-image-with-meta-viewer |
| Depth tier | Parser with a shared viewer (see Depth tiers) |
| Breadth tier | B1 Complete (see Breadth tiers) |
How much Poka reads
B1 Complete. Everything the format defines that a reader would see is decoded, in every version Poka claims. Anything not decoded is immaterial and listed.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-16: parsers/poka-gif/src/lib.rs (image GifDecoder header, walk_blocks over images, graphic control, comment and NETSCAPE2.0 blocks), unit tests, tests/samples.rs (frame counts, loop forever and 65535 repeats, summed delays 3.96 s and 58.55 s, comment count; since 2026-10-21 (#451) every first frame decoded and compared with Pillow 12.3.0 within 1 level, and all 26 animated files play Pillow's frame and play counts, the longest 380 frames); all 52 corpus files are GIF89a, none GIF87a. Covers GIF87a and GIF89a; judged B1 because the unread parts are immaterial to a preview.
What Poka does not read
- comment text is counted, not shown
- pixel aspect ratio, background colour, transparency and interlace flags not reported
- Palette row is fixed text, no colour-table size read
- plain-text and other application extensions ignored (browsers do not draw them)
- a delay under 20 ms is played as 100 ms, as browsers do
- files over the decode budget get header facts only, no picture
- GIF87a not covered by the corpus
Background
The Library of Congress, quoting Wikipedia, says CompuServe introduced GIF in 1987 for its file-download areas, replacing a black-and-white run-length format. Poka reads the logical screen and walks the blocks to count the frames, then decodes every frame in the module (composited as its disposal says) to RGBA with its delay, and the viewer plays them on a canvas. A long animation is shrunk, then cut short with a note, to fit a 24 MiB frame budget; a canvas whose decode would not fit the memory budget gets the header facts and the reason.
Versions
| Version | Identifier | Poka | Note |
|---|---|---|---|
| GIF87a | GIF87a |
Read | |
| GIF89a | GIF89a |
Read | The version that adds the control extensions animation uses. |
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- image (used; MIT OR Apache-2.0; Rust; https://github.com/image-rs/image)
- gif (candidate; MIT OR Apache-2.0; Rust; https://github.com/image-rs/image-gif)
- GIF89a (candidate; public spec; spec; https://www.w3.org/Graphics/GIF/spec-gif89a.txt)
Sources
- https://loc.gov/preservation/digital/formats/fdd/fdd000133.shtml
- parsers/poka-gif/src/lib.rs