PBMB Files
Portable Bit Map (binary)
PBMB is the binary version of the portable bitmap PBM format,
a lowest common denominator
monochrome file format. It was originally designed to make it reasonable
to mail bitmaps between different types of machines. Now it serves as
the common language of a large family of bitmap conversion filters.
The definition is as follows:
-
the typical file extension is ".pbm", but an extension of
".pnm" is also occasionally used.
-
A "magic number" for identifying the file type. A
binary PBMB file's magic
number is the two characters "P4".
-
Whitespace (blanks, TABs, CRs, LFs).
-
A width, formatted as ASCII characters in decimal.
-
Whitespace.
-
A height, again in ASCII decimal.
-
Whitespace. (It may be the case that this is required to be a single
character of whitespace, usually a new line.)
-
Width * height bits, stored 8 bits per byte, high bit first and
low bit last, starting at the top-left corner of the bitmap,
proceeding
in normal English reading order.
The bit '1' means black, '0' means white.
PBMB File Characteristics:
-
binary
-
black and white
-
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:
The PBMA data directory
describes ASCII Portable Bit Map files.
The PGMB data directory
describes binary Portable Gray Map files.
The PPMB data directory
describes binary Portable Pixel Map files.
Reference:
-
the NETPBM homepage.
Programs to create a PBMB file include:
Programs and routines to read a PBMB file:
-
MATLAB can read a PBMB
file with a command like A=imread('file','PBM').
-
pbmlib,
FORTRAN90 routines.
-
pbmb_io C++ routines
-
The Visual Toolkit
routine vtkPNMReader can read a
binary PBM file into VTK.
Programs and routines to write a PBMB file:
-
MATHEMATICA
includes an Export[filename,object] command
that can save a graphics object as a binary PBM file.
-
MATLAB can write a PBMB
file with a command like imwrite(a,'filename','PBM').
-
pbmlib,
FORTRAN90 routines.
-
pbmb_io C++ routines
-
The Visual Toolkit
routine vtkPNMWriter can write a VTK
image to a binary PBM file.
Programs to display a PBMB file:
-
The
AVS
module read_any_image can read a PBMB file;
-
GIMP,
the GNU Image Manipulation Program, can display
a PBMB file.
-
The
ImageVision
program imgview can display a PBMB file.
-
MATLAB can display a PBMB
file, once it is read in, with a command like image(A).
-
xv can display
a PBMB file.
Programs to convert a PBMB file to another format:
-
The
ImageMagick,
program convert can convert a PBMB file to
BMP, CGM, EPS, FIG, FITS, GIF, JPG, PBM, PDF, PGM, PNG, PNM,
PPM, PS, RGB, TIF, XBM or XPM format.
-
GIMP,
the GNU Image Manipulation Program, can read a PBMB file
and write out a copy in a variety of formats.
-
The
NETPBM
program PBMTOASCII can read a PBMB file and write out it out as
ASCII graphics.
-
xv can read a PBMB file
and write out a copy in BMP, FIT, GIF, JPG, PGM, PPM, RGB or TIF
format.
Programs to convert a file to PBMB format:
-
The
ImageMagick,
program convert can convert a
BMP, CGM, EPS, FIG, FITS, GIF, JPG, PBM, PDF, PGM, PNG, PNM,
PPM, PS, RGB, TIF, XBM or XPM file to PBMB format.
-
GIMP,
the GNU Image Manipulation Program, can read a file in a
variety of formats, and write it out as a PBMB file.
-
xv can read a file in a
BMP, FIT, GIF, JPG, PGM, PPM, RGB or TIF format, and write it out
as a PBMB file.
Sample PBMB Files:
-
circle.pbm,
a circle, drawn on a 200 by 200 grid;
-
circle.png,
a PNG version.
-
feep.pbm,
the example described above, on a 24 by 7 grid;
-
feep.png,
a PNG version.
-
gerrymander.pbm,
an image of the "Gerry-mander", on a 303 by 325 grid;
-
gerrymander.png,
a PNG version.
-
letter_a.pbm, a capital A,
using a 25 by 25 grid.
-
letter_a.png,
a PNG version.
-
pbmlib.pbm, a file created by PBMLIB.
-
pbmlib.png,
a PNG version.
-
scs.pbm,
the letters "SCS", on a 136 by 82 grid;
-
scs.png,
a PNG version.
You can go up one level to
the DATA page.
Last revised on 29 October 2009.