.PBM File Extension
Portable Bitmap Image
3.7 | 13 Votes
|Category||Raster Image Files|
What is a PBM file?
A PBM file is a black-and-white image saved in the Portable Bitmap format. It consists of a plain text header and a grid of 0s and 1s that specify the color of each of the image's pixels. 0s represent white pixels; 1s represent black pixels.
Jef Poskanzer developed the PBM format as part of his Netpbm project. PBM is an intermediate format, used primarily when converting images from one format to another. In the middle of a conversion, Netpbm may save an image as a PBM file. It then uses the PBM file to create the converted image. (Netpbm uses the .PGM and .PPM formats in similar fashion.)
Two variants of the PBM format exist. Files saved in the original PBM format, identified by the magic number P1 in their header, always contain only one image. Files saved in the more recent version of the PBM format, identified by the magic number P4 in their header, can contain more than one image. Also, P1 PBM files can contain whitespace in their raster grid; P4 files cannot.
NOTE: Each PBM image's width and height is specified in its header. For example, an image that is 50 pixels wide by 65 pixels tall will include the numbers 50 65 in its header.
How to open a PBM file
You can also open a PBM file with Microsoft Notepad (Windows), Apple TextEdit (Mac), or any other text editor, to view the plain text data it contains. This can be useful if, for example, you want to make sure your PBM file is formatted correctly before you attempt to open it in an image editor.