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 / pgmtopbm.1 < prev    next >
Text File  |  1996-11-18  |  3KB  |  96 lines

  1. .TH pgmtopbm 1 "26 July 1988"
  2. .IX pgmtopbm
  3. .SH NAME
  4. pgmtopbm - convert a portable graymap into a portable bitmap
  5. .SH SYNOPSIS
  6. .B pgmtopbm
  7. .RB [ -floyd | -fs | -threshold
  8. .RB | -hilbert
  9. .RB | -dither8 | -d8 | -cluster3
  10. .RB | -c3 | -cluster4 | -c4
  11. .RB | -cluster8 | -c8 ]
  12. .RB [ -value
  13. .IR val ]
  14. .RB [ -clump
  15. .IR size ]
  16. .RI [ pgmfile ]
  17. .SH DESCRIPTION
  18. Reads a portable graymap as input.
  19. Produces a portable bitmap as output.
  20. .IX halftoning
  21. .PP
  22. Note that there is no pbmtopgm converter, because any pgm program can
  23. read pbm files automagically.
  24. .SH OPTIONS
  25. .PP
  26. The default quantization method is boustrophedonic Floyd-Steinberg error
  27. diffusion
  28. .RB ( -floyd
  29. or
  30. .BR -fs ).
  31. .IX Floyd-Steinberg
  32. .IX "error diffusion"
  33. Also available are simple thresholding
  34. .RB ( -threshold );
  35. .IX thresholding
  36. Bayer's ordered dither
  37. .RB ( -dither8 )
  38. with a 16x16 matrix; and three different sizes of 45-degree clustered-dot dither
  39. .RB  ( -cluster3 ,
  40. .BR -cluster4 ,
  41. .BR -cluster8 ).
  42. A space filling curve halftoning method using the Hilbert curve is also
  43. available.
  44. .RB ( -hilbert );
  45. .IX dithering
  46. .PP
  47. Floyd-Steinberg will almost always give the best looking results; however,
  48. looking good is not always what you want.
  49. For instance, thresholding can be used in a pipeline with the
  50. .I pnmconvol
  51. .IX pnmconvol
  52. tool, for tasks like edge and peak detection.
  53. And clustered-dot dithering gives a newspaper-ish look, a useful special effect.
  54. .PP
  55. The
  56. .B -value
  57. flag alters the thresholding value for Floyd-Steinberg and
  58. simple thresholding.
  59. It should be a real number between 0 and 1.
  60. Above 0.5 means darker images; below 0.5 means lighter.
  61. .PP
  62. The Hilbert curve method is useful for processing images before display
  63. on devices that do not render individual pixels distinctly (like laser
  64. printers). This dithering method can give better results than the
  65. dithering usually done by the laser printers themselves.
  66. The
  67. .B -clump
  68. flag alters the number of pixels in a clump. This is usually an
  69. integer between 2 and 100 (default 5). Smaller clump sizes smear the
  70. image less and are less grainy, but seem to loose some grey scale
  71. linearity. Typically a PGM image will have to be scaled to fit on a
  72. laser printer page (2400 x 3000 pixels for an A4 300 dpi page), and
  73. then dithered to a PBM image before being converted to a postscript file.
  74. A printing pipeline might look something like:
  75. pnmscale -xysize 2400 3000 image.pgm | pgmtopbm -hil | pnmtops -scale 0.25 > image.ps 
  76. .PP
  77. All flags can be abbreviated to their shortest unique prefix.
  78. .SH REFERENCES
  79. The only reference you need for this stuff is "Digital Halftoning" by
  80. Robert Ulichney, MIT Press, ISBN 0-262-21009-6.
  81. .PP
  82. The Hilbert curve space filling method is taken from
  83. "Digital Halftoning with Space Filling Curves" by Luiz Velho,
  84. Computer Graphics Volume 25, Number 4, proceedings of SIGRAPH '91,
  85. page 81. ISBN 0-89791-436-8
  86. .SH "SEE ALSO"
  87. pbmreduce(1), pgm(5), pbm(5), pnmconvol(1), pnmscale(1), pnmtops(1)
  88. .SH AUTHOR
  89. Copyright (C) 1989 by Jef Poskanzer.
  90. .\" Permission to use, copy, modify, and distribute this software and its
  91. .\" documentation for any purpose and without fee is hereby granted, provided
  92. .\" that the above copyright notice appear in all copies and that both that
  93. .\" copyright notice and this permission notice appear in supporting
  94. .\" documentation.  This software is provided "as is" without express or
  95. .\" implied warranty.
  96.