Home : File Types : PGM File

.PGM File Extension

File TypePortable Gray Map Image

DeveloperJef Poskanzer
3.6 (28 Votes)
CategoryRaster Image Files
FormatText and Binary

What is a PGM file?

A PGM file is a grayscale image file saved in the portable gray map (PGM) format and encoded with one or two bytes (8 or 16 bits) per pixel. It contains header information and a grid of numbers that represent different shades of gray from black (0) to white (up to 65,536). PGM files are typically stored in ASCII text format, but also have a binary representation.

More Information

PGM files include a header that defines the PGM format type ("P2" for text or "P5" for binary), image width and height, and the maximum number of shades. While binary PGM files may contain multiple images, ASCII PGM files may only include one image.

The PGM format is one of several image formats defined by the Netpbm project, which is an open source package of graphics programs. Other formats include the portable bitmap (.PBM) format and portable pixmap (.PPM) format.

NOTE: PGM files may also be called "portable greymap" files.

Open and view .PGM files with File Viewer Plus.
Programs that open PGM files
Updated 11/29/2016

About PGM Files

Our goal is to help you understand what a file with a *.pgm suffix is and how to open it.

The Portable Gray Map Image file type, file format description, and Mac, Windows, Linux, and Android programs listed on this page have been individually researched and verified by the FileInfo team. We strive for 100% accuracy and only publish information about file formats that we have tested and validated.

If you would like to suggest any additions or updates to this page, please let us know.