Debian Codegraph @

upstream/debian-unstable/man1/pamtosvg.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Pamtosvg User Manual" 1 "23 April 2006" "netpbm documentation"
7
8 .SH NAME
9 pamtosvg - convert a Netpbm image to a SVG (Scalable Vector Graphics) image
10
11 .UN synopsis
12 .SH SYNOPSIS
13
14 \fBpamtosvg\fP
15
16 [\fB-background-color=\fP\fIcolorname\fP]
17 [\fB-centerline\fP]
18 [\fB-corner-threshold=\fP\fIangle\fP]
19 [\fB-corner-always-threshold=\fP\fIangle\fP]
20 [\fB-corner-surround=\fP\fIinteger\fP]
21 [\fB-tangent-surround=\fP\fIinteger\fP]
22 [\fB-error-threshold=\fP\fIfloat\fP]
23 [\fB-filter-iterations=\fP\fIcount\fP]
24 [\fB-line-reversion-threshold=\fP\fIfloat\fP]
25 [\fB-line-threshold=\fP\fIfloat\fP]
26 [\fB-width-weight-factor=\fP\fIfloat\fP]
27 [\fB-preserve-width\fP]
28 [\fB-remove-adjacent-corners\fP]
29 [\fB-log\fP]
30 [\fB-report-progress\fP] [\fIpnmfile\fP]
31 .PP
32 Minimum unique abbreviation of option is acceptable. You may use
33 double hyphens instead of single hyphen to denote options. You may use
34 white space in place of the equals sign to separate an option name
35 from its value.
36
37 .UN description
38 .SH DESCRIPTION
39 .PP
40 This program is part of
41 .BR "Netpbm" (1)\c
42 \&.
43 .PP
44 \fBpamtosvg\fP reads a PNM image as input and produce an SVG
45 (Scalable Vector Graphics) image as output. Thus, it traces curves
46 in the input image and creates a set of splines that represent the
47 image.
48 .PP
49 SVG is a vector image format, which means it describes curves that
50 compose an image. By contrast, PNM is a raster format, which means it
51 describes dots that compose an image. The main practical difference
52 between the two types is that you can scale vector images better. A
53 vector image also takes a lot less data to describe an image if the
54 image is composed of simple curves.
55 .PP
56 That means it is really an understatement to say that \fBpamtosvg\fP
57 is an image format converter. It's really an image tracer. Its main job
58 is to trace a raster image and find the lines in it. It then represents
59 its findings in SVG format.
60 .PP
61 \fBpamtosvg\fP does the same kind of thing that StreamLine,
62 CorelTrace, and Autotrace do. It is in fact derived from Autotrace.
63 .PP
64 SVG is a gigantic format, capable of amazing things. \fBpamtosvg\fP
65 exploits only a morsel of it. The SVG image produced by \fBpamtosvg\fP
66 consists of a single <svg> element, which has a "width"
67 attribute and a "height" attribute. The value of that element
68 is composed of <path> elements. That's it.
69 .PP
70 In the SVG output, distances are unitless, with one unit corresponding
71 to one pixel of the input.
72 .PP
73 So that \fBpamtosvg\fP will find simple curves in the image, you
74 may want to remove speckles from it with \fBpbmclean\fP and consolidate
75 multiple shades into single colors with \fBpnmquant\fP first.
76 .PP
77 For more information on SVG, see
78 .UR http://www.w3.org/Graphics/SVG/
79 the Worldwide Web Consortium's SVG web page
80 .UE
81 \&.
82
83
84 .UN options
85 .SH OPTIONS
86 .PP
87 In addition to the options common to all programs based on libnetpbm
88 (most notably \fB-quiet\fP, see
89 .UR index.html#commonoptions
90 Common Options
91 .UE
92 \&), \fBpamtosvg\fP recognizes the following
93 command line options:
94
95
96 .TP
97 \fB-background-color=\fP\fIcolorname\fP
98 Treat the specified color as the background color and ignore it.
99 .sp
100 If you don't specify this option, \fBpamtosvg\fP does not recognize
101 any background color.
102 .sp
103 Specify the color (\fIcolorname\fP) as described for the
104 .UR libnetpbm_image.html#colorname
105 argument of the \fBpnm_parsecolor()\fP library routine
106 .UE
107 \&.
108
109 .TP
110 \fB-centerline\fP
111 Trace an object's centerline.
112 .sp
113 By default, \fBpamtosvg\fP traces an object's outline.
114
115 .TP
116 \fB-corner-always-threshold=\fP\fIangle\fP
117 Consider any angle at a pixel which falls below angle \fIangle\fP
118 (in decimal floating point degrees) as a corner, even if it is
119 bordered by other corner pixels. Default is 60 degrees.
120
121 .TP
122 \fB-corner-surround=\fP\fIinteger\fP
123 Consider the specified number of pixels on either side of a
124 point when determining if that point is a corner. Default is 4.
125
126 .TP
127 \fB-corner-threshold=\fP\fIangle\fP
128 Consider any pixel which forms an angle with its predecessors and
129 successors that is smaller than \fIangle\fP (in decimal floating
130 point degrees) as a corner. Default is 100.
131
132 .TP
133 \fB-error-threshold=\fP\fIfloat\fP
134 Subdivide fitted curves that are offset by a number of pixels
135 exceeding the specified number. Default is 2.0.
136
137 .TP
138 \fB-filter-iterations=\fP\fIinteger\fP
139 Smooth the curve the specified number of times prior to fitting
140 Default is 4.
141
142 .TP
143 \fB-line-reversion-threshold=\fP\fIfloat\fP
144 When a spline is closer to a straight line than the specified real
145 number weighted by the square of the curve length, maintain it as a
146 straight line, even if it is a list with curves.
147 .sp
148 Default is .01.
149
150 .TP
151 \fB-line-threshold=\fP\fIfloat\fP
152 If a spline does not deviate from the straight line defined by its
153 endpoints by more than the specified number of pixels, then treat it
154 as a straight line.
155 .sp
156 Default is 1.
157
158 .TP
159 \fB-log\fP
160 Create a log of the curve tracing process (suitable for
161 debugging). Put it in the file named \fIinputfile\fP\fB.log\fP in
162 the current directory, where \fIinputfile\fP is the root of the input
163 file name, or "pamtosvg" if the input is from Standard Input
164 or a file with a weird name.
165
166 .TP
167 \fB-preserve-width\fP
168 Preserve line width prior to thinning. Meaningful only with
169 \fB-centerline\fP.
170
171 .TP
172 \fBremove-adjacent-corners\fP
173 Remove adjacent corners.
174
175 .TP
176 \fB-report-progress\fP
177 Report the progress of the tracing to Standard Error as it happens.
178
179 .TP
180 \fB-tangent-surround\fP
181 Consider the specified number of points to either side of a point
182 when computing the tangent at that point. Default is 3.
183
184 .TP
185 \fB-width-weight-factor\fP
186 Weight factor for fitting the linewidth.
187
188
189
190 .UN applicationnotes
191 .SH APPLICATION NOTES
192 .PP
193 A convenient way to view an SVG document is with a web browser. Many
194 understand a file whose name ends in ".svg" to be an SVG
195 image and can render it.
196
197
198 .UN seealso
199 .SH SEE ALSO
200 .BR "pnmquant" (1)\c
201 \&,
202 .BR "pbmclean" (1)\c
203 \&,
204 .BR "pnm" (1)\c
205 \&,
206 .UR http://autotrace.sourceforge.net
207 Autotrace
208 .UE
209 \&
210
211 .UN history
212 .SH HISTORY
213 .PP
214 \fBpamtosvg\fP was added to Netpbm in Version 10.33 (March 2006).
215 .PP
216 The core of \fBpamtosvg\fP -- the curve tracing logic -- was taken
217 nearly unmodified from Martin Weber's Autotrace program. That program
218 duplicates a lot of Netpbm function, so \fBpamtosvg\fP is a much leaner
219 program.
220 .PP
221 Bryan Henderson created \fBpamtosvg\fP, basically just by adapting
222 Autotrace to Netpbm.
223 .PP
224 Autotrace was first released in 2000 and updates were released
225 through 2002. A number of people wrote the code in it, but Masatake
226 Yamato and Martin Weber appear to be the principal creators of it.
227 .PP
228 As of June 2006, there was a
229 .UR http://autotrace.sourceforge.net
230 Sourceforge project
231 .UE
232 \& for it.
233 .SH DOCUMENT SOURCE
234 This manual page was generated by the Netpbm tool 'makeman' from HTML
235 source. The master documentation is at
236 .IP
237 .B http://netpbm.sourceforge.net/doc/pamtosvg.html
238 .PP