PPM vs PGM
PGM stores one grayscale sample per pixel. It is suitable for grayscale processing and masks; exporting a colour image requires a deliberate luminance conversion and removes colour information.
Image format
Portable Pixmap: simple uncompressed raster samples for image-processing pipelines.
Explore the format
Choose a target format for your PPM images.
Marked paths may need steps such as flattening, rasterization, tone mapping or animation loss.
Choose a source format to convert to PPM.
Marked paths may need steps such as flattening, rasterization, tone mapping or animation loss.
Portable Pixmap
PPM is Netpbm’s simple RGB raster interchange format. Each pixel has red, green and blue samples with a declared maximum value. A short header defines dimensions and precision, making the layout convenient for programs that need direct access to colour samples rather than a complex image container.
P3 stores textual numbers; P6 stores binary samples. Binary samples use one byte when maxval is below 256 and two bytes, most significant first, otherwise, up to 65535. PPM has no alpha or compression. The specification describes nonlinear RGB samples; alternate linear or sRGB conventions require explicit workflow agreement.
Use PPM for colour-image processing, debugging and simple pipeline interchange. It makes pixels easy to inspect but files can be large and lack rich metadata. Confirm maxval and colour interpretation before importing scientific or rendered values; treating linear data as display-encoded colour changes the result.
Netpbm stores these samples without compression. Reducing colour, thresholding or changing maxval can still lose information before storage; text and binary representations change the layout, not its image meaning.
This format belongs to the documented Pbmplus/Netpbm evolution. The history distinguishes the original bitmap idea, later channel models and library development.
Different formats, different trade-offs. Choose for the image and the workflow.
PGM stores one grayscale sample per pixel. It is suitable for grayscale processing and masks; exporting a colour image requires a deliberate luminance conversion and removes colour information.
PBM stores only black and white, one bit per pixel in its binary form. It fits bitonal masks and line art; tonal images need thresholding or dithering, so gradients cannot remain as continuous gray levels.
PAM extends Netpbm with explicit tuple types and depths, including RGB_ALPHA and GRAYSCALE_ALPHA. It suits channel-aware processing, but receiving tools must agree on the tuple meaning and it remains uncompressed.
PNG preserves decoded pixels losslessly and can carry alpha. It is useful for transparent graphics and screenshots; it does not preserve editable document layers or camera sensor data, and photographic files can be large.
PPM is Netpbm’s simple RGB raster interchange format. Each pixel has red, green and blue samples with a declared maximum value. A short header defines dimensions and precision, making the layout convenient for programs that need direct access to colour samples rather than a complex image container.
Netpbm stores these samples without compression. Reducing colour, thresholding or changing maxval can still lose information before storage; text and binary representations change the layout, not its image meaning.
They are text and binary representations of PPM RGB samples. Switching representation does not add alpha or compress the image; a decoder must interpret maxval and the corresponding sample width.
Check the magic number, sample precision and tuple or channel meaning. Many simple readers accept only one binary image and 8-bit samples even though the specifications permit more.
Preserve maxval and colour interpretation when creating the rendered output. Grayscale and bitonal targets remove information deliberately; alpha requires an alpha-bearing tuple or a separate mask. Optional comments may not transfer.
Use PPM for colour-image processing, debugging and simple pipeline interchange. It makes pixels easy to inspect but files can be large and lack rich metadata. Confirm maxval and colour interpretation before importing scientific or rendered values; treating linear data as display-encoded colour changes the result.