PGMB Files - Binary Portable Gray Map Graphics Files (original) (raw)
PGMB is a data directory of Binary PGM files, the binary form of the portable gray map PGM format. It is a simple gray map description. The definition is as follows:
- the typical file extension is ".pgm", but an extension of ".pnm" is also occasionally used.
- A "magic number" for identifying the file type. A binary PGM file's magic number is the two characters "P5".
- Whitespace (blanks, TABs, CRs, LFs).
- A width, formatted as ASCII characters in decimal.
- Whitespace.
- A height, again in ASCII decimal.
- Whitespace.
- The maximum gray value, MAXVAL, again in ASCII decimal. MAXVAL must be between 0 and 255.
- A single character of whitespace, typically a newline;
- Width * height gray values, each stored as a plain byte, between 0 and the specified maximum value, separated by whitespace, starting at the top-left corner of the graymap, proceeding in normal English reading order. A value of 0 means black, and the maximum value means white. Characters from a "#" to the next end-of-line are ignored (comments).
Binary PGM File Characteristics:
- binary
- Gray scale only
- 2D
- No compression
- 1 image
Licensing:
The computer code and data files described and made available on this web page are distributed underthe GNU LGPL license.
Related Data and Programs:
PBMB, a data directory which contains examples of binary PBM files, binary Portable Bit Map 2D graphics, black and white;
PGMA, a data directory which contains examples of ASCII PGM files, ASCII Portable Gray Map, 2D graphics;
PPMB, a data directory which contains examples of binary PPM files, Portable Pixel Map (binary) 2D graphics, color;
Reference:
Sample Files:
- <baboon.pgm>, a baboon.
- <baboon.png>, a PNG version.
- <barbara.pgm>.
- <barbara.png>, a PNG version.
- <bird.pgm>, a bird.
- <bird.png>, a PNG version.
- <buffalo.pgm>, a small herd of buffalo.
- <buffalo.png>, a PNG version.
- <casablanca.pgm>, a still from the movie "Casablanca".
- <casablanca.png>, a PNG version.
- <coins.pgm>, some coins.
- <coins.png>, a PNG version.
- <columns.pgm>, a 640x480 image of a person standing by some columns;
- <columns.png>, a PNG image.
- <dewey%5Fdefeats%5Ftruman.pgm>, a famously erroneous newspaper headline.
- <dewey%5Fdefeats%5Ftruman.png>, a PNG version.
- <feep.pgm>, a simple 7 by 24 example that displays "FEEP" in block letters.
- <feep.png>, a PNG image.
- <ladyzhenskaya.pgm>.
- <ladyzhenskaya.png>, a PNG version.
- <lena.pgm>.
- <lena.png>, a PNG version.
- <lena%5Fnoisy.pgm>, a "noisy" version of the lena image.
- <lena%5Fnoisy.png>, a PNG version.
- <milking.pgm>, a cow being milked.
- <milking.png>, a PNG version.
- <mona%5Flisa.pgm>, the Mona Lisa.
- <mona%5Flisa.png>, a PNG version.
- <pbmlib.pgm>, a file created by PBMLIB.
- <pbmlib.png>, a PNG version.
- <pepper.pgm>, a picture of peppers.
- <pepper.png>, a PNG version.
- <roi%5F14.pgm>, a 507 wide by 505 high image an MRI, the 14th in a sequence.11
- <roi%5F14.png>, a PNG image.
- <snap.pgm>, a snapshot of a mother and child.
- <snap.png>, a PNG version.
- <surf.pgm>, a beach picture.
- <surf.png>, a PNG image.
You can go up one level tothe DATA page.
Last revised on 22 July 2011.