Home  /  File formats  /  pgm

PGM file format

Extension.pgm
Categoryimages
Programs
ACD Systems ACDSee 18
ACD System Canvas 15
Adobe Photoshop with plug-in
Corel PaintShop Pro X8
GIMP
Inkscape
Netpbm
DescriptionThe PGM file format was developed in conjunction with the open-source Netpbm graphics program package. Created by Jef Poskanzer in 1988, PGM was designed to store grayscale images and support bitmap images. This file format is compatible with modern graphics editing software such as Corel PaintShop Pro X4, ACDSee Photo Manager 14, and ACD Systems Canvas 15. Since PGM is a plain text format, it can be easily edited using any text editor, making it resistant to changes that can occur when images are transmitted via email. PGM files are classified into two types, distinguished by magic numbers - P2 and P5, which assist graphics editing software in identifying the data encryption standard.
Technical detailsPortable Gray Map Images can be stored with each pixel consuming either 8 or 16 bits of memory space. A PGM file consists of two main sections - the header and the image data. The header begins with a magic number, followed by characters indicating the image width, image height, and maximum grayscale shade value, which should not exceed 65,536. These data are separated by whitespaces. While primarily used on UNIX-based operating systems, the open-source nature of PGM files allows for compatibility with macOS and Windows.
MIME type
application/octet-stream