PNG
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.
PNG Image Preview.
At a glance
| Original creator | The PNG Development Group, under the auspices of the World Wide Web Consortium; now the W3C PNG Working Group |
| First published | 1996 |
| Purpose | Lossless, portable and well-compressed storage of raster images: indexed colour, greyscale and truecolour, with an optional alpha channel. |
| Extensions | .png |
| Poka parser | poka-png |
| Viewer | poka-image-with-meta-viewer |
| Depth tier | Parser with a shared viewer (see Depth tiers) |
| Breadth tier | B2 Broad (see Breadth tiers) |
How much Poka reads
B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-16, decode added 2026-10-21 (#451): parsers/poka-png/src/lib.rs (header via image PngDecoder, ancillary chunk walk, decode_still and ApngDecoder frames through poka-image-common) and tests/samples.rs (pHYs, tIME, sRGB, tEXt, XMP/IPTC presence on testPNG.png and iptc.png; all 152 corpus PNGs decoded and compared with Pillow 12.3.0 for size and sampled pixels within 1 level; an APNG under .png plays 20 frames); corpus headers scanned (8/16-bit, grey, RGB, indexed 2/4/8-bit, alpha, 2 Adam7 files). Covers PNG 1.x and 2nd edition files; wasm route only, the desktop host bypasses it.
What Poka does not read
- EXIF contents (eXIf chunk only flagged present)
- XMP and IPTC contents (flagged present only)
- compressed text (zTXt, compressed iTXt) not inflated
- Author text deliberately hidden
- cHRM, sBIT, bKGD, tRNS and palette details not reported
- files over the decode budget (three quarters of memory_mb) get header facts only, no picture
- ICC profile named only, not decoded, and not applied to the pixels (they are shown as stored)
Background
The Library of Congress says PNG 1.0 became the W3C's first Recommendation on 1 October 1996 and IETF RFC 2083 on 15 January 1997, as a patent-free replacement for GIF. Poka reads the header facts and decodes the pixels in the module to RGBA, which the viewer draws on a canvas; an animated PNG (acTL) is played frame by frame. The declared size is checked against the memory budget before any pixel is decoded, so a small file that declares a huge image gets the header facts and the reason; larger images are shrunk to a 4 MiB preview, with a note.
Versions
| Version | Identifier | Poka | Note |
|---|---|---|---|
| PNG 1.0, 1.1 and 1.2 | 89 50 4E 47 0D 0A 1A 0A |
Not recorded | 1996, December 1998 (sRGB and iCCP chunks) and August 1999 (iTXt), per the Library of Congress. Decoded in the module. |
| PNG Second Edition (ISO/IEC 15948:2004) | Not recorded | W3C, November 2003; ISO/IEC, March 2004. | |
| PNG Third Edition | Not recorded | W3C Recommendation of 24 June 2025, which also documents APNG. |
Derived and related formats
- Animated PNG (
.apng): Has its own row in FILE_FORMATS.csv.
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)
- png (candidate; MIT OR Apache-2.0; Rust; https://github.com/image-rs/image-png)
- PNG 3rd edition (W3C) (candidate; public spec; spec; https://www.w3.org/TR/png-3/)
Sources
- https://loc.gov/preservation/digital/formats/fdd/fdd000153.shtml
- parsers/poka-png/src/lib.rs