poka.sh

Docs

PPM

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.

Netpbm Preview.

At a glance

Original creator Jef Poskanzer, in Pbmplus; now part of Netpbm
First published 1988
Purpose Portable pixmap: a minimal RGB image with a short text header. In Poka the .ppm parser reads the Netpbm family from bitmaps to PAM, except PFM floating-point maps, which it refuses.
Extensions .ppm
Poka parser poka-ppm
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: high (the reviewer read the code and a test that proves the claim). Basis: Reviewed 2026-10-16: parsers/poka-ppm/src/lib.rs (P1 to P7 via the image 0.25.10 pnm decoder, own PAM header fallback) and tests/samples.rs. Corpus .ppm, .pbm and .pam files cover P5, P6, P7 RGB_ALPHA and P6 1x1; the test run failed on artcraft-photocraft-pam-07.pam, a PFM file. Covers plain and raw PBM, PGM and PPM, and PAM.

What Poka does not read

  • PFM floating-point maps (PF colour and Pf greyscale): refused with 'Unsupported Netpbm variant' (8 corpus files)
  • PAM with a custom TUPLTYPE or a depth the image crate does not know (for example CMYK or multispectral): header facts only
  • only the first image of a multi-image stream

Background

Wikipedia says that by the end of 1988 Poskanzer had added the PGM and PPM formats to Pbmplus, after PBM, and that Netpbm replaced Pbmplus in 1993. Poka reads the header itself, so it can bound the image's size before decoding, and decodes the pixels with the image crate. A PAM file whose tuple type the image crate does not know is still reported from its header rather than refused.

Versions

Version Identifier Poka Note
Plain and raw PPM P3, P6 Read
PBM and PGM read through the same parser P1, P4, P2, P5 Read
PAM P7 Partly read Decoded when the image crate knows the TUPLTYPE; header facts otherwise.

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)
  • oxideav-pbm (candidate; MIT; Rust; https://github.com/OxideAV/oxideav-pbm) — could replace about 2,000 lines of Netpbm parsers

Sources