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.īesides, the. pgm extension can denote certain CGI (Common Gateway Interface) programs located and run on web servers (server-side scripting). PGM images can be displayed on most platforms either with the use of the netpbm package or any multiformat image viewer.Īlternatively, as an abbreviation of 'Program,' the. ASCII PGM files can be converted into binary, and vice versa. Binary PGM files contain the same data in a binary form, which is more compact and processed faster. Such text-based PGM files can be created and edited with a text editor. 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. To distinguish ASCII and binary PGM forms, special ID markers are used: P2 (ASCII) and P5 (binary).Ī plaintext. pgm file is either a plaintext (ASCII) or binary file with a definition of an 8-bit grayscale bitmap image. Poskanzer), a Unix-originating cross-platform set of utilities to work with graphic images.Ī. PNM was introduced with netpbm (initially Pbmplus by J. 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.