Home  /  File formats  /  ppm

PPM file format

Extension.ppm
Categoryimages
Programs
Adobe Photoshop
Corel Draw
GIMP
Netpbm
DescriptionPortable pixmap images can be stored using the PPM format, which is basic, for example, color (PPM), grayscale (PGM), and black and white (PBM). A portable pixmap can provide a versatile representation of information in the conversion process of bitmap image files of the three mentioned types across different platforms. The PPM format was developed by Jeff Poskanzer.
Technical detailsPPM files consist of sequences of one or more PPM images. There is no data, padding, or limits before, after, or in the middle of the images. Each PPM image has a single magic number that identifies the type of file, which is the two-character P6. This is followed by whitespace (blanks, TABs, CRs, and LFs) and the width presented as ASCII characters in decimal. Another whitespace is then included in ASCII decimal.
The color value (Maxval) in a PPM image is in decimal form and must be greater than zero but less than 65536. It is followed by another single whitespace character on a separate line. The image is then made up of a raster of height rows in reverse chronological order. Each row consists of width pixels in a left to right format.
The samples in a PPM image have a pure binary nature, represented by either one or two bytes. If the Maxval is less than 256, then it is one byte; otherwise, it is two bytes with the first byte being the most significant. There is another version of the PPM format known as the straightforward format, but it is not commonly used.
MIME type
image/x-ppm
image/x?portable?pixmap