What Is PGM?
Portable Graymap (PGM) was created by the Netpbm project in 1988 and is used for grayscale images for computer vision and scientific work. PGM is the grayscale member of the Netpbm family, widely used in computer vision and image-processing courses. Its main advantage is dead-simple grayscale pixels any program can parse; the downside is that no color and no compression.
| Compression | Lossless |
|---|---|
| Color depth | 8-bit grayscale |
| Transparency | No |
| Animation | No |
| Opens in | GIMP, ImageMagick, IrfanView, Python (Pillow, OpenCV), MATLAB |
Most Useful PGM Conversions
Converting PGM to JPG, WebP, PNG covers almost every need: JPG is the most compatible, WebP is the most efficient for websites, and PNG is lossless.
Tips for Working With PGM
Color is converted to grayscale using standard luminance weights.