This is a collection of simple formats and utilities written and maintained by Jef Poskanzer, and available on most Unix systems.
-
PBM (Portable BitMap) - monochrome
-
PGM (Portable GreyMap) - gray-scale
-
PPM (Portable PixMap) - color
-
PNM (Portable aNything) - for programs which operate on any format
|
The headers have fields: MagicValue, ImageWidth, ImageHeight, MaxValue (not on PBM)
|
The MagicValues are PBM - P1(ascii) and P4 (raw), PGM - P2 and P5, PPM - P3 and P6
|
Example of a PPM file - each pixel has 3 (RGB) values:
|