pgm 

PGM File Extension

Have a problem opening a .PGM file? We collect information about file formats and can explain what PGM files are. Additionally we recommend software suitable for opening or converting such files.

What is the .PGM file type?

Standing for 'Portable GrayMap,' the .pgm extension denotes the open 'Portable GrayMap' (PGM) file type and format that belongs to the wider PNM (Portable aNy Map) series of elementary graphical formats. PNM was introduced with netpbm (initially Pbmplus by J.Poskanzer), a Unix-originating cross-platform set of utilities to work with graphic images.

A .pgm file is either a plaintext (ASCII) or binary file with a definition of an 8-bit grayscale bitmap image. To distinguish ASCII and binary PGM forms, special ID markers are used: P2 (ASCII) and P5 (binary).



A plaintext .pgm file contains a series of lines with decimal numbers (0-255) delimited by whitespace, with each number representing one pixel and its intensity level. Such text-based PGM files can be created and edited with a text editor. Binary PGM files contain the same data in a binary form, which is more compact and processed faster. ASCII PGM files can be converted into binary, and vice versa.

PGM images can be displayed on most platforms either with the use of the netpbm package or any multiformat image viewer.


Alternatively, as an abbreviation of 'Program,' the .pgm extension can denote certain CGI (Common Gateway Interface) programs located and run on web servers (server-side scripting). A typical PGM script file is a plaintext file with a source code of a server script in Perl, Python, VisualBasic or other scripting languages.


Besides, the .pgm extension can also be found in 'Drum Set' files used by AKAI MPC sampler device with drum pads. An AKAI PGM file is a binary set of sound samples associated with different percussion instruments. Different AKAI MPC models (1000, 2000, 3000) use different file formats for their .pgm files.



Software to open or convert PGM files

You can open PGM files with the following programs: 

Popular Formats

Video Tutorials