pbm man page on FreeBSD

Man page or keyword search:  
man Server   9747 pages
apropos Keyword Search (all sections)
Output format
FreeBSD logo
[printable version]

PBM(5)			    BSD File Formats Manual			PBM(5)

NAME
     pbm — portable bitmap file format

DESCRIPTION
     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:

     ·	 A "magic number" for identifying the file type.  A pbm file's magic
	 number is the two characters "P1".
     ·	 Whitespace (blanks, TABs, CRs, LFs).
     ·	 A width, formatted as ASCII characters in decimal.
     ·	 Whitespace.
     ·	 A height, again in ASCII decimal.
     ·	 Whitespace.
     ·	 Width * height bits, each either '1' or '0', starting at the top-left
	 corner of the bitmap, proceeding in normal English reading order.
     ·	 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.

     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, accept‐
     ing 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:

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

AUTHORS
     Copyright (C) 1989, 1991 by Jef Poskanzer.

BSD			      September 27, 1991			   BSD
[top]

List of man pages available for FreeBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
...................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net