PAM vs PPM
PPM stores three RGB samples per pixel without compression or alpha. It is easy to inspect in processing pipelines, but sacrifices compactness and rich metadata; select it when direct sample interchange is the priority.
Image format
Portable Arbitrary Map: simple uncompressed raster samples for image-processing pipelines.
Explore the format
Choose a target format for your PAM images.
Marked paths may need steps such as flattening, rasterization, tone mapping or animation loss.
Choose a source format to convert to PAM.
Marked paths may need steps such as flattening, rasterization, tone mapping or animation loss.
Portable Arbitrary Map
PAM extends Netpbm raster interchange with explicit tuple depth and type. Pixels contain a declared number of samples, which can represent grayscale, RGB, alpha-bearing data or an application-defined tuple. This makes channel meaning more explicit than the separate older PBM, PGM and PPM layouts.
A P7 text header declares WIDTH, HEIGHT, DEPTH, MAXVAL and optional TUPLTYPE, followed by binary samples. Values use one or two bytes according to maxval, up to 65535. Defined tuple types include RGB_ALPHA and GRAYSCALE_ALPHA; arbitrary tuples do not guarantee that an image viewer knows how to display them.
Use PAM for channel-aware processing, transparent Netpbm intermediates and agreed custom raster tuples. Storage is uncompressed and does not provide a general ICC/Exif metadata system. Keep tuple meaning, precision and colour interpretation documented; a tool built only for PPM may reject PAM or remove extra channels on export.
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.
PPM stores three RGB samples per pixel without compression or alpha. It is easy to inspect in processing pipelines, but sacrifices compactness and rich metadata; select it when direct sample interchange is the priority.
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.
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.
PAM extends Netpbm raster interchange with explicit tuple depth and type. Pixels contain a declared number of samples, which can represent grayscale, RGB, alpha-bearing data or an application-defined tuple. This makes channel meaning more explicit than the separate older PBM, PGM and PPM layouts.
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.
No. Alpha depends on DEPTH and TUPLTYPE, for example RGB_ALPHA. An arbitrary fourth sample is not automatically alpha unless the tuple definition says so.
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 PAM for channel-aware processing, transparent Netpbm intermediates and agreed custom raster tuples. Storage is uncompressed and does not provide a general ICC/Exif metadata system. Keep tuple meaning, precision and colour interpretation documented; a tool built only for PPM may reject PAM or remove extra channels on export.