PPMB Files Portable Pixel Map (binary) (original) (raw)
PPMB is a data directory which contains examples of the binary version of the PPM portable pixel map format. It is a simple RGB color image description. The definition is as follows:
- the typical file extension is ".ppm", but an extension of ".pnm" is also occasionally used.
- A "magic number" for identifying the file type. A binary PPMB file's magic number is the two characters "P6".
- Whitespace (blanks, TABs, CRs, LFs).
- A width, formatted as ASCII characters in decimal.
- Whitespace.
- A height, again in ASCII decimal.
- Whitespace.
- The maximum color-component value MAXVAL, again in ASCII decimal. For the binary format, MAXVAL cannot be any greater than 255.
- a single charcter of "whitespace", usually a new line.
- Width * height pixels, each pixel being described by 3 bytes, each between 0 and the specified maximum value, starting at the top-left corner of the pixmap, proceeding in normal English reading order. The three values for each pixel represent red, green, and blue, respectively; a value of 0 means that color is off, and the maximum value means that color is maxed out.
PPMB File Characteristics:
- binary
- RGB color
- 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:
BMP_TO_PPMB, a C++ program which converts a Microsoft BMP file to abinary PPM file;
PBMB, a data directory which contains examples of binary PBM files, binary Portable Bit Map 2D graphics, black and white;
PGMB, a data directory which contains examples of binary PGM files, binary Portable Gray Map, 2D graphics;
PPMA, a data directory which contains examples of ASCII PPM files, Portable Pixel Map (ASCII) 2D graphics, color;
PPMA_TO_PPMB, a C++ program which converts an ASCII PPM file to a binary PPM file;
PPMB_IO, a C++ library which handles the binary PPM (Portable Pixel Map) format.
PPMB_TO_BMP, a C++ program which converts a binary PPM file to a Microsoft BMP file;
PPMB_TO_PPMA, a C++ program which converts a binary PPM file to an ASCII PPM file;
Reference:
Sample Files:
- <bell%5F206.ppm>, a Bell 206 helicopter.
- <bell%5F206.png>, a PNG version.
- <blackbuck.ppm>, a picture of a buck.
- <blackbuck.png>, a PNG version.
- <newton.ppm>, an image of the basins of attraction of Newton's method for Z^3=1.
- <newton.png>, a PNG version.
- <pbmlib.ppm>.
- <pbmlib.png>, a PNG version.
- <underwater%5Fbmx.ppm>, a slightly blurred image of a bicycle rider on a diving board.
- <underwater%5Fbmx.png>, a PNG version.
You can go up one level tothe DATA page.
Last revised on 01 April 2011.