Artists and graphic designers use PGM files to store small 2D images in grayscale. Super accessible and user-friendly, these files are easy to edit. Get the lowdown on their origins, uses, and more.
What is a PGM file?
PGM (Portable Gray Map) files store grayscale 2D images. Each pixel within the image contains only one or two bytes of information (8 or 16 bits). While that might not sound like a lot of information, PGM files can hold tens of thousands of shades — ranging from pure black to white, and every shade of gray in between.
Even though PGMs are the standard for portable graphics, their small file size and color limitations dinged their reputation and turned them into the “lowest common denominator” of image files. But there are still many great uses for this file type.
History of the PGM file.
Developers created the PGM file format in the US in the late 1980s. Their hallmark is simplicity. PGMs contain a single image that’s both easy to write programs for and to edit.
The file type uses a plain-text (ASCII) or binary file, containing information on width and height, whitespaces, and a gray value. Rows divide the width and height, and each space has a grayscale value — this is what creates the larger image.
How to use PGM files.
Artists, designers, and coding students regularly use PGM files for a variety of reasons.
How to open a PGM file.
Most image and text editing programs can open PGM files on both Windows and Mac computers. You’ll first need to download a compatible program.
1. Start by navigating to your saved file folder.
2. Right-click on the file name.
3. Click Choose default program, followed by Browse.
4. Launch your file with your selected program.
5. The PGM file should open in its own window.
PGM files: frequently asked questions.
How do I convert PGM files into other types of photo files?
What is the difference between PGM, JPEG, and TIFF?
How do I convert a PGM to JPEG?
You can convert your PGM image to JPEG using Adobe Photoshop.
- Open Adobe Photoshop.
- Select File > Open.
- Choose your PGM image.
- Select File > Save As.
- Select JPEG from the dropdown File Types menu.