home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / NETWORK / netpbm_docs.lzh / NETPBM / DOCS / pbm.5 < prev    next >
Text File  |  1996-11-18  |  3KB  |  92 lines

  1. .TH pbm 5 "27 September 1991"
  2. .SH NAME
  3. pbm - portable bitmap file format
  4. .SH DESCRIPTION
  5. The portable bitmap format is a lowest common denominator monochrome
  6. file format.
  7. .IX "PBM file format"
  8. It was originally designed to make it reasonable to mail bitmaps
  9. between different types of machines using the typical stupid network
  10. mailers we have today.
  11. Now it serves as the common language of a large family of bitmap
  12. conversion filters.
  13. The definition is as follows:
  14. .IP - 2
  15. A "magic number" for identifying the file type.
  16. A pbm file's magic number is the two characters "P1".
  17. .IX "magic numbers"
  18. .IP - 2
  19. Whitespace (blanks, TABs, CRs, LFs).
  20. .IP - 2
  21. A width, formatted as ASCII characters in decimal.
  22. .IP - 2
  23. Whitespace.
  24. .IP - 2
  25. A height, again in ASCII decimal.
  26. .IP - 2
  27. Whitespace.
  28. .IP - 2
  29. Width * height bits, each either '1' or '0', starting at the top-left
  30. corner of the bitmap, proceeding in normal English reading order.
  31. .IP - 2
  32. The character '1' means black, '0' means white.
  33. .IP - 2
  34. Whitespace in the bits section is ignored.
  35. .IP - 2
  36. Characters from a "#" to the next end-of-line are ignored (comments).
  37. .IP - 2
  38. No line should be longer than 70 characters.
  39. .PP
  40. Here is an example of a small bitmap in this format:
  41. .nf
  42. P1
  43. # feep.pbm
  44. 24 7
  45. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  46. 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0
  47. 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0
  48. 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0
  49. 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
  50. 0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0
  51. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  52. .fi
  53. .PP
  54. Programs that read this format should be as lenient as possible,
  55. accepting anything that looks remotely like a bitmap.
  56. .PP
  57. There is also a variant on the format, available
  58. by setting the RAWBITS option at compile time.  This variant is
  59. .IX RAWBITS
  60. different in the following ways:
  61. .IP - 2
  62. The "magic number" is "P4" instead of "P1".
  63. .IP - 2
  64. The bits are stored eight per byte, high bit first low bit last.
  65. .IP - 2
  66. No whitespace is allowed in the bits section, and only a single character
  67. of whitespace (typically a newline) is allowed after the height.
  68. .IP - 2
  69. The files are eight times smaller and many times faster to read and write.
  70. .SH "SEE ALSO"
  71. atktopbm(1), brushtopbm(1), cmuwmtopbm(1), g3topbm(1),
  72. gemtopbm(1), icontopbm(1),
  73. macptopbm(1), mgrtopbm(1), pi3topbm(1), xbmtopbm(1),
  74. ybmtopbm(1),
  75. pbmto10x(1), pnmtoascii(1), pbmtoatk(1), pbmtobbnbg(1),
  76. pbmtocmuwm(1), pbmtoepson(1),
  77. pbmtog3(1), pbmtogem(1), pbmtogo(1), pbmtoicon(1), pbmtolj(1),
  78. pbmtomacp(1), pbmtomgr(1), pbmtopi3(1), pbmtoplot(1), pbmtoptx(1),
  79. pbmtox10bm(1), pbmtoxbm(1), pbmtoybm(1),
  80. pbmtozinc(1),
  81. pbmlife(1), pbmmake(1), pbmmask(1), pbmreduce(1),
  82. pbmtext(1), pbmupc(1),
  83. pnm(5), pgm(5), ppm(5)
  84. .SH AUTHOR
  85. Copyright (C) 1989, 1991 by Jef Poskanzer.
  86. .\" Permission to use, copy, modify, and distribute this software and its
  87. .\" documentation for any purpose and without fee is hereby granted, provided
  88. .\" that the above copyright notice appear in all copies and that both that
  89. .\" copyright notice and this permission notice appear in supporting
  90. .\" documentation.  This software is provided "as is" without express or
  91. .\" implied warranty.
  92.