In the binary formats, PBM uses 1 bit per pixel, PGM uses 8 bits per pixel, and PPM uses 24 bits per pixel: 8 for red, 8 for green, 8 for blue.
A simple example of the PBM format is as follows (there is a newline character at the end of each line): .