poka.sh

Docs

APNG

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.

Animated PNG Preview.

At a glance

Original creator Stuart Parmenter and Vladimir Vukićević of Mozilla; adopted by the W3C
First published 2004
Purpose Animated images in PNG: frame-based animation with full alpha and higher colour depth than GIF, readable as a still PNG by software that ignores the animation.
Extensions .apng
Poka parser poka-apng
Viewer poka-image-with-meta-viewer
Depth tier Parser with a shared viewer (see Depth tiers)
Breadth tier B3 Core (see Breadth tiers)

How much Poka reads

B3 Core. Only the main content type or types are decoded (for example geometry but not materials, layers or annotations, or only one version family). The list of gaps is substantial.

Confidence: high (the reviewer read the code and a test that proves the claim). Basis: Reviewed 2026-10-16; frames replayed since 2026-10-19 (#511), sent as RGBA frames since 2026-10-21 (#451): parsers/poka-apng/src/lib.rs (animation() chunk walk, image's ApngDecoder through poka-image-common's plan_frames and decode_frames), unit tests, tests/samples.rs on apngkit_ball.apng (20 frames, 1.50 s) and apngkit_over_background.apng (3 frames, 5.00 s): frame and play counts and the first frame's size and sampled pixels match Pillow 12.3.0; the card states frame count, plays, summed delay and whether the default image is frame 1. Covers APNG as in PNG Third Edition via the .apng route.

What Poka does not read

  • each frame is sent as the whole canvas, so a long animation is shrunk or cut short to fit the 24 MiB frame budget, with a note
  • 16-bit APNG frames are not composited by the image crate: such a file shows its default image
  • a frame that fails to decode ends the animation there; with fewer than two frames the default image is shown
  • individual frame delays not listed, only their sum
  • PNG ancillary chunks not read on this route (no pHYs, tIME, text, EXIF, XMP, ICC, gamma)
  • files over the 48 MiB decode budget get metadata only

Background

Wikipedia dates the specification to 27 August 2004; the Library of Congress says APNG was added to the PNG specification in 2022. It adds three chunks to PNG: acTL (frame and loop count, before the first IDAT), fcTL (each frame's size, position, delay and disposal) and fdAT (frame data). Poka plays the animation: every frame is decoded in the module as the file composites it and sent as RGBA with its delay, and the viewer plays the frames on a canvas. A file whose frames do not decode falls back to the default image, listed with the frames the animation declares. The image's declared size is checked against the memory budget before any pixel is decoded.

Versions

Version Identifier Poka Note
APNG (PNG Third Edition) acTL chunk Partly read Every frame replayed; a file that does not decode falls back to its default image (parsers/poka-apng/src/lib.rs).

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)
  • png (used; MIT OR Apache-2.0; Rust)

Sources