*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> pbm (5)              
Title
Content
Arch
Section
 

PBM(5)

Contents


NAME    [Toc]    [Back]

     pbm -- portable bitmap file format

DESCRIPTION    [Toc]    [Back]

     The portable bitmap format is a lowest common denominator monochrome file
     format.  It was originally designed to make it reasonable to mail bitmaps
     between different types of machines using the typical stupid network
     mailers we have today.  Now it serves as the common language of a large
     family of bitmap conversion filters.  The definition is as follows:

     +o	 A "magic number" for identifying the file type.  A pbm file's magic
	 number is the two characters "P1".
     +o	 Whitespace (blanks, TABs, CRs, LFs).
     +o	 A width, formatted as ASCII characters in decimal.
     +o	 Whitespace.
     +o	 A height, again in ASCII decimal.
     +o	 Whitespace.
     +o	 Width * height bits, each either '1' or '0', starting at the top-left
	 corner of the bitmap, proceeding in normal English reading order.
     +o	 The character '1' means black, '0' means white.
     +o	 Whitespace in the bits section is ignored.
     +o	 Characters from a "#" to the next end-of-line are ignored (comments).
     +o	 No line should be longer than 70 characters.

     Here is an example of a small bitmap in this format:

     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

     Programs that read this format should be as lenient as possible, accepting
 anything that looks remotely like a bitmap.

     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:

     +o	 The "magic number" is "P4" instead of "P1".
     +o	 The bits are stored eight per byte, high bit first low bit last.
     +o	 No whitespace is allowed in the bits section, and only a single character
 of whitespace (typically a newline) is allowed after the
	 height.
     +o	 The files are eight times smaller and many times faster to read and
	 write.

AUTHORS    [Toc]    [Back]

     Copyright (C) 1989, 1991 by Jef Poskanzer.


FreeBSD 5.2.1		      September 27, 1991		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
pdftopbm Linux Portable Document Format (PDF) to Portable Bitmap (PBM) converter (version 1.00)
bdftopcf IRIX convert X font from Bitmap Distribution Format to Portable Compiled Format
bdftopcf Tru64 convert X font from Bitmap Distribution Format to Portable Compiled Format
bdftopcf HP-UX convert X font from Bitmap Distribution Format to Portable Compiled Format
pgm IRIX portable graymap file format
ppm IRIX portable pixmap file format
libpbm IRIX functions to support portable bitmap programs
iflBMP IRIX Windows bitmap format image file
xpdf Linux Portable Document Format (PDF) file viewer for X (version 1.00)
pdffonts Linux Portable Document Format (PDF) font analyzer (version 1.00)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service