version 1 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
pgmtopbm |
|
|
2 |
!!!pgmtopbm |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
REFERENCES |
|
|
8 |
SEE ALSO |
|
|
9 |
AUTHOR |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
pgmtopbm - convert a portable graymap into a portable bitmap |
|
|
15 |
!!SYNOPSIS |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__pgmtopbm__ [[__-floyd__|__-fs__|__-threshold__ |
|
|
19 |
|__-hilbert__ |
|
|
20 |
|__-dither8__|__-d8__|__-cluster3__ |
|
|
21 |
|__-c3__|__-cluster4__|__-c4__ |
|
|
22 |
|__-cluster8__|__-c8__] [[__-value__ ''val''] |
|
|
23 |
[[__-clump__ ''size''] [[''pgmfile''] |
|
|
24 |
!!DESCRIPTION |
|
|
25 |
|
|
|
26 |
|
|
|
27 |
Reads a portable graymap as input. Produces a portable |
|
|
28 |
bitmap as output. |
|
|
29 |
|
|
|
30 |
|
|
|
31 |
Note that there is no pbmtopgm converter. Any program that |
|
|
32 |
uses the Netpbm libraries to read PGM files, including |
|
|
33 |
virtually all programs in the Netpbm package, will read a |
|
|
34 |
PBM file automatically as if it were a PGM |
|
|
35 |
file. |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
If you are using a less intelligent program that expects PGM |
|
|
39 |
input, use __pnmdepth__ to convert the PBM file to PGM. |
|
|
40 |
As long as the depth is greater than 1, __pnmdepth__ will |
|
|
41 |
generate PGM. This less intelligent program quite probably |
|
|
42 |
is also not intelligent enough to deal with general maxvals, |
|
|
43 |
so you should specify a depth of 255. |
|
|
44 |
!!OPTIONS |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
The default quantization method is boustrophedonic |
|
|
48 |
Floyd-Steinberg error diffusion (__-floyd__ or |
|
|
49 |
__-fs__). Also available are simple thresholding |
|
|
50 |
(__-threshold__); Bayer's ordered dither |
|
|
51 |
(__-dither8__) with a 16x16 matrix; and three different |
|
|
52 |
sizes of 45-degree clustered-dot dither (__-cluster3__, |
|
|
53 |
__-cluster4__, __-cluster8__). A space filling curve |
|
|
54 |
halftoning method using the Hilbert curve is also available. |
|
|
55 |
(__-hilbert__); |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
Floyd-Steinberg will almost always give the best looking |
|
|
59 |
results; however, looking good is not always what you want. |
|
|
60 |
For instance, thresholding can be used in a pipeline with |
|
|
61 |
the ''pnmconvol'' tool, for tasks like edge and peak |
|
|
62 |
detection. And clustered-dot dithering gives a newspaper-ish |
|
|
63 |
look, a useful special effect. |
|
|
64 |
|
|
|
65 |
|
|
|
66 |
The __-value__ flag alters the thresholding value for |
|
|
67 |
Floyd-Steinberg and simple thresholding. It should be a real |
|
|
68 |
number between 0 and 1. Above 0.5 means darker images; below |
|
|
69 |
0.5 means lighter. |
|
|
70 |
|
|
|
71 |
|
|
|
72 |
The Hilbert curve method is useful for processing images |
|
|
73 |
before display on devices that do not render individual |
|
|
74 |
pixels distinctly (like laser printers). This dithering |
|
|
75 |
method can give better results than the dithering usually |
|
|
76 |
done by the laser printers themselves. The __-clump__ |
|
|
77 |
flag alters the number of pixels in a clump. This is usually |
|
|
78 |
an integer between 2 and 100 (default 5). Smaller clump |
|
|
79 |
sizes smear the image less and are less grainy, but seem to |
|
|
80 |
loose some grey scale linearity. Typically a PGM image will |
|
|
81 |
have to be scaled to fit on a laser printer page (2400 x |
|
|
82 |
3000 pixels for an A4 300 dpi page), and then dithered to a |
|
|
83 |
PBM image before being converted to a postscript file. A |
|
|
84 |
printing pipeline might look something like: pnmscale |
|
|
85 |
-xysize 2400 3000 image.pgm | pgmtopbm -hil | pnmtops -scale |
|
|
86 |
0.25 __ |
|
|
87 |
|
|
|
88 |
|
|
|
89 |
All flags can be abbreviated to their shortest unique |
|
|
90 |
prefix. |
|
|
91 |
!!REFERENCES |
|
|
92 |
|
|
|
93 |
|
|
|
94 |
The only reference you need for this stuff is |
|
|
95 |
|
|
|
96 |
|
|
|
97 |
The Hilbert curve space filling method is taken from |
|
|
98 |
!!SEE ALSO |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
pbmreduce(1), pgm(5), pbm(5), pnmconvol(1), pnmscale(1), |
|
|
102 |
pnmtops(1) |
|
|
103 |
!!AUTHOR |
|
|
104 |
|
|
|
105 |
|
|
|
106 |
Copyright (C) 1989 by Jef Poskanzer. |
|
|
107 |
---- |