PPMB Files
Portable Pixel Map (binary)
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 under
the GNU LGPL license.
Related Data and Programs:
BMP_TO_PPMB,
a C++ program which
converts a Microsoft BMP file
to a
binary 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:
-
the NETPBM homepage.
Sample Files:
You can go up one level to
the DATA page.
Last revised on 01 April 2011.