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 >
Wrap
Text File
|
1996-11-18
|
3KB
|
96 lines
.TH pgmtopbm 1 "26 July 1988"
.IX pgmtopbm
.SH NAME
pgmtopbm - convert a portable graymap into a portable bitmap
.SH SYNOPSIS
.B pgmtopbm
.RB [ -floyd | -fs | -threshold
.RB | -hilbert
.RB | -dither8 | -d8 | -cluster3
.RB | -c3 | -cluster4 | -c4
.RB | -cluster8 | -c8 ]
.RB [ -value
.IR val ]
.RB [ -clump
.IR size ]
.RI [ pgmfile ]
.SH DESCRIPTION
Reads a portable graymap as input.
Produces a portable bitmap as output.
.IX halftoning
.PP
Note that there is no pbmtopgm converter, because any pgm program can
read pbm files automagically.
.SH OPTIONS
.PP
The default quantization method is boustrophedonic Floyd-Steinberg error
diffusion
.RB ( -floyd
or
.BR -fs ).
.IX Floyd-Steinberg
.IX "error diffusion"
Also available are simple thresholding
.RB ( -threshold );
.IX thresholding
Bayer's ordered dither
.RB ( -dither8 )
with a 16x16 matrix; and three different sizes of 45-degree clustered-dot dither
.RB ( -cluster3 ,
.BR -cluster4 ,
.BR -cluster8 ).
A space filling curve halftoning method using the Hilbert curve is also
available.
.RB ( -hilbert );
.IX dithering
.PP
Floyd-Steinberg will almost always give the best looking results; however,
looking good is not always what you want.
For instance, thresholding can be used in a pipeline with the
.I pnmconvol
.IX pnmconvol
tool, for tasks like edge and peak detection.
And clustered-dot dithering gives a newspaper-ish look, a useful special effect.
.PP
The
.B -value
flag alters the thresholding value for Floyd-Steinberg and
simple thresholding.
It should be a real number between 0 and 1.
Above 0.5 means darker images; below 0.5 means lighter.
.PP
The Hilbert curve method is useful for processing images before display
on devices that do not render individual pixels distinctly (like laser
printers). This dithering method can give better results than the
dithering usually done by the laser printers themselves.
The
.B -clump
flag alters the number of pixels in a clump. This is usually an
integer between 2 and 100 (default 5). Smaller clump sizes smear the
image less and are less grainy, but seem to loose some grey scale
linearity. Typically a PGM image will have to be scaled to fit on a
laser printer page (2400 x 3000 pixels for an A4 300 dpi page), and
then dithered to a PBM image before being converted to a postscript file.
A printing pipeline might look something like:
pnmscale -xysize 2400 3000 image.pgm | pgmtopbm -hil | pnmtops -scale 0.25 > image.ps
.PP
All flags can be abbreviated to their shortest unique prefix.
.SH REFERENCES
The only reference you need for this stuff is "Digital Halftoning" by
Robert Ulichney, MIT Press, ISBN 0-262-21009-6.
.PP
The Hilbert curve space filling method is taken from
"Digital Halftoning with Space Filling Curves" by Luiz Velho,
Computer Graphics Volume 25, Number 4, proceedings of SIGRAPH '91,
page 81. ISBN 0-89791-436-8
.SH "SEE ALSO"
pbmreduce(1), pgm(5), pbm(5), pnmconvol(1), pnmscale(1), pnmtops(1)
.SH AUTHOR
Copyright (C) 1989 by Jef Poskanzer.
.\" Permission to use, copy, modify, and distribute this software and its
.\" documentation for any purpose and without fee is hereby granted, provided
.\" that the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation. This software is provided "as is" without express or
.\" implied warranty.