home *** CD-ROM | disk | FTP | other *** search
/ Encyclopedia of Graphics File Formats Companion / GFF_CD.ISO / formats / pbm / spec / pbm.txt next >
Text File  |  1994-06-01  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4.      pbm(5)              AMIGA (27 September 1991)              pbm(5)
  5.  
  6.  
  7.  
  8.      NAME
  9.           pbm - portable bitmap file format
  10.  
  11.      DESCRIPTION
  12.           The portable bitmap format is a lowest common denominator
  13.           monochrome file format.  It was originally designed to make
  14.           it reasonable to mail bitmaps between different types of
  15.           machines using the typical stupid network mailers we have
  16.           today.  Now it serves as the common language of a large
  17.           family of bitmap conversion filters.  The definition is as
  18.           follows:
  19.  
  20.           - A "magic number" for identifying the file type.  A pbm
  21.             file's magic number is the two characters "P1".
  22.  
  23.           - Whitespace (blanks, TABs, CRs, LFs).
  24.  
  25.           - A width, formatted as ASCII characters in decimal.
  26.  
  27.           - Whitespace.
  28.  
  29.           - A height, again in ASCII decimal.
  30.  
  31.           - Whitespace.
  32.  
  33.           - Width * height bits, each either '1' or '0', starting at
  34.             the top-left corner of the bitmap, proceeding in normal
  35.             English reading order.
  36.  
  37.           - The character '1' means black, '0' means white.
  38.  
  39.           - Whitespace in the bits section is ignored.
  40.  
  41.           - Characters from a "#" to the next end-of-line are ignored
  42.             (comments).
  43.  
  44.           - No line should be longer than 70 characters.
  45.  
  46.           Here is an example of a small bitmap in this format:
  47.           P1
  48.           # feep.pbm
  49.           24 7
  50.           0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  51.           0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0
  52.           0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0
  53.           0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0
  54.           0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
  55.           0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0
  56.           0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  57.  
  58.           Programs that read this format should be as lenient as
  59.           possible, accepting anything that looks remotely like a
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 1/30/92)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      pbm(5)              AMIGA (27 September 1991)              pbm(5)
  71.  
  72.  
  73.  
  74.           bitmap.
  75.  
  76.           There is also a variant on the format, available by setting
  77.           the RAWBITS option at compile time.  This variant is
  78.           different in the following ways:
  79.  
  80.           - The "magic number" is "P4" instead of "P1".
  81.  
  82.           - The bits are stored eight per byte, high bit first low bit
  83.             last.
  84.  
  85.           - No whitespace is allowed in the bits section, and only a
  86.             single character of whitespace (typically a newline) is
  87.             allowed after the height.
  88.  
  89.           - The files are eight times smaller and many times faster to
  90.             read and write.
  91.  
  92.      SEE ALSO
  93.           atktopbm(1), brushtopbm(1), cmuwmtopbm(1), g3topbm(1),
  94.           gemtopbm(1), icontopbm(1), macptopbm(1), mgrtopbm(1),
  95.           pi3topbm(1), xbmtopbm(1), ybmtopbm(1), pbmto10x(1),
  96.           pnmtoascii(1), pbmtoatk(1), pbmtobbnbg(1), pbmtocmuwm(1),
  97.           pbmtoepson(1), pbmtog3(1), pbmtogem(1), pbmtogo(1),
  98.           pbmtoicon(1), pbmtolj(1), pbmtomacp(1), pbmtomgr(1),
  99.           pbmtopi3(1), pbmtoplot(1), pbmtoptx(1), pbmtox10bm(1),
  100.           pbmtoxbm(1), pbmtoybm(1), pbmtozinc(1), pbmlife(1),
  101.           pbmmake(1), pbmmask(1), pbmreduce(1), pbmtext(1), pbmupc(1),
  102.           pnm(5), pgm(5), ppm(5)
  103.  
  104.      AUTHOR
  105.           Copyright (C) 1989, 1991 by Jef Poskanzer.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 1/30/92)
  130.  
  131.  
  132.  
  133.