pgm
What is a .pgm file?
image/x-portable-graymap
PGM (Portable Graymap) is a Netpbm-family format storing single-channel greyscale images as ASCII or raw binary values with a simple text header. It uses no compression and supports 8- or 16-bit gray levels. It is frequently used in image processing and computer vision.
How to use a .pgm file
Use an example PGM to test greyscale parsing, verify intensity output from processing pipelines, or provide a simple input for computer-vision and OCR toolchains.
Download example .pgm files
- PGM: Netpbm Test Image (P5)A 256×256 fruit still-life image as binary Netpbm P5 (8-bit greyscale): the minimal, header-plus-raw-pixels family used across Unix imaging tools. For testing Netpbm parsers and conversion.
- Head and shoulders portrait of a black (pgm binary)The same 512x512 photograph written as pgm binary. Greyscale Netpbm. Every member of this group is identical pixels, so a decoder returning different dimensions or a different pixel count has lost something rather than simply produced a different file; the 24-bit PNG in this group is lossless and is the reference the lossy members are measured against Source plate a-av-f3.
- A Black man in his seventies with grey (pgm binary)The same 512x350 photograph written as pgm binary. Greyscale Netpbm. Every member of this group is identical pixels, so a decoder returning different dimensions or a different pixel count has lost something rather than simply produced a different file; the 24-bit PNG in this group is lossless and is the reference the lossy members are measured against Source plate p-market-sen.
- Silver sedan parked on a suburban (pgm binary)The same 512x512 photograph written as pgm binary. Greyscale Netpbm. Every member of this group is identical pixels, so a decoder returning different dimensions or a different pixel count has lost something rather than simply produced a different file; the 24-bit PNG in this group is lossless and is the reference the lossy members are measured against Source plate v-car-sedan.
- Overhead plate of fresh pasta with (pgm binary)The same 512x512 photograph written as pgm binary. Greyscale Netpbm. Every member of this group is identical pixels, so a decoder returning different dimensions or a different pixel count has lost something rather than simply produced a different file; the 24-bit PNG in this group is lossless and is the reference the lossy members are measured against Source plate f-plate-pasta.
- Flat red brick wall (pgm binary)The same 512x341 photograph written as pgm binary. Greyscale Netpbm. Every member of this group is identical pixels, so a decoder returning different dimensions or a different pixel count has lost something rather than simply produced a different file; the 24-bit PNG in this group is lossless and is the reference the lossy members are measured against Source plate t-tex-brick.
- Smooth abstract gradient, deep teal to (pgm binary)The same 512x341 photograph written as pgm binary. Greyscale Netpbm. Every member of this group is identical pixels, so a decoder returning different dimensions or a different pixel count has lost something rather than simply produced a different file; the 24-bit PNG in this group is lossless and is the reference the lossy members are measured against Source plate t-grad-cool.
- Fantasy video game environment, stone (pgm binary)The same 512x512 photograph written as pgm binary. Greyscale Netpbm. Every member of this group is identical pixels, so a decoder returning different dimensions or a different pixel count has lost something rather than simply produced a different file; the 24-bit PNG in this group is lossless and is the reference the lossy members are measured against Source plate g-fantasy-keep.
and 1 more in the library.