Netpbm formats
From Just Solve the File Format Problem
The Netpbm formats are a family of simple raster image file formats, associated with the Netpbm library and suite of image processing utilities.
Contents |
Formats
- PBM (portable bitmap) is a bi-level image format.
- PGM (portable graymap) is a grayscale image format.
- PPM (portable pixmap) is a color image format.
- PNM (portable anymap) is a collective name for PBM, PGM, and PPM. A .pnm file may use any of those formats.
- PAM: Refer to PAM (Portable Arbitrary Map). Although PAM is one of the Netpbm formats, it's different enough that it's best documented in a separate article.
Identification
Each file begins with two ASCII characters, which serve as a signature.
The PBM, PGM, and PPM formats come in two varieties: a text ("plain") format, and a binary ("raw") format.
Format | Signature | PRONOM |
---|---|---|
PBM, text | P1 |
x-fmt/164 |
PGM, text | P2 |
fmt/407 |
PPM, text | P3 |
x-fmt/178 |
PBM, binary | P4 |
fmt/409 |
PGM, binary | P5 |
fmt/406 |
PPM, binary | P6 |
fmt/408 |