English
Home   /   File format   /   pgm

PGM file format

File extension
.pgm
File category
Description
PGM file format was developed alongside the open-source Netpbm package of graphics program. Developed by Jef Poskanzer in 1988, PGM was a format for storing grayscale images and supporting bitmap. The PGM file format is forward compatible with recent graphics editing software like Corel PaintShop Pro X4, ACDSee Photo Manager 14, and ACD Systems Canvas 15. Being a plain text format, PGM can be edited using any available text editor, and thus survives the quintessential changes that image files undergo when transmitted via email. PGM files come in two types, only differentiated by magic numbers – P2 and P5, which helps graphics editor software identify the data encryption standard.
Technical details
Portable Gray Map Images can be stored away with each pixel taking up memory space of either 8 or 16 bits. There are two major sections in the plain text string of a PGM file – the header and image data. The header starts with the magic number, followed by characters indicating image width, image height, maximum grayscale shade value – never exceeding 65.536, all sandwiched by whitespaces. Though used mainly on the UNIX-based operating system, being open-source has earned the PGM file compatibility with macOS and Windows.
Programs
ACD Systems ACDSee 18
ACD System Canvas 15
Adobe Photoshop with plug-in
Corel PaintShop Pro X8
GIMP
Inkscape
Netpbm
Developer
Jef Poskanzer
MIME type
application/octet-stream