PBM Files


PBM is the portable bitmap 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 character '1' means black, '0' means white. Whitespace in the bits section is ignored. Characters from a "#" to the next end-of-line are ignored (comments). No line should be longer than 70 characters.

There is also a variant on the format, available by setting the RAWBITS option at compile time. This variant is different in the following ways:

The files are eight times smaller and many times faster to read and write.

EXAMPLE:

        P1
        # feep.pbm
        24 7
        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
        0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0
        0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0
        0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0
        0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
        0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0
        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
      

PBM files are:

Reference:

Programs to create a PBM file include:

Programs to view a PBM file include:

Routines to read or write a PBM file:

Programs to convert a PBM file to another format:

Programs to convert a file to PBM format:

Files you may copy:

Back to the data home page.


Last revised on 10 May 2002.