1Pamtosvg User Manual(0)                                Pamtosvg User Manual(0)
2
3
4

NAME

6       pamtosvg  -  convert a Netpbm image to a SVG (Scalable Vector Graphics)
7       image
8
9

SYNOPSIS

11       pamtosvg
12
13       [-background-color=colorname]  [-centerline]  [-corner-threshold=angle]
14       [-corner-always-threshold=angle]  [-corner-surround=integer] [-tangent-
15       surround=integer]  [-error-threshold=float]  [-filter-iterations=count]
16       [-line-reversion-threshold=float]    [-line-threshold=float]   [-width-
17       weight-factor=float]    [-preserve-width]    [-remove-adjacent-corners]
18       [-log] [-report-progress] [pnmfile]
19
20

DESCRIPTION

22       This program is part of Netpbm(1).
23
24       pamtosvg reads a PNM image as input and produce an SVG (Scalable Vector
25       Graphics) image as output.  Thus, it traces curves in the  input  image
26       and creates a set of splines that represent the image.
27
28       SVG is a vector image format, which means it describes curves that com‐
29       pose an image.  By contrast, PNM is a raster  format,  which  means  it
30       describes  dots  that  compose an image.  The main practical difference
31       between the two types is that you can scale vector  images  better.   A
32       vector  image  also  takes  a lot less data to describe an image if the
33       image is composed of simple curves.
34
35       That means it is really an understatement to say that  pamtosvg  is  an
36       image  format converter.  It's really an image tracer.  Its main job is
37       to trace a raster image and find the lines in it.  It  then  represents
38       its findings in SVG format.
39
40       pamtosvg  does  the same kind of thing that StreamLine, CorelTrace, and
41       Autotrace do.  It is in fact derived from Autotrace.
42
43       SVG is a gigantic format, capable of amazing things.  pamtosvg exploits
44       only  a morsel of it.  The SVG image produced by pamtosvg consists of a
45       single <svg> element, which has a  'width'  attribute  and  a  'height'
46       attribute.   The  value of that element is composed of <path> elements.
47       That's it.
48
49       In the SVG output, distances are unitless, with one unit  corresponding
50       to one pixel of the input.
51
52       So  that pamtosvg will find simple curves in the image, you may want to
53       remove speckles from it with pbmclean and consolidate  multiple  shades
54       into single colors with pnmquant first.
55
56       For more information on SVG, see the Worldwide Web Consortium's SVG web
57       page ⟨http://www.w3.org/Graphics/SVG/⟩ .
58
59
60

OPTIONS

62       Minimum unique abbreviation of option is acceptable.  You may use  dou‐
63       ble  hyphens  instead  of single hyphen to denote options.  You may use
64       white space in place of the equals sign to separate an option name from
65       its value.
66
67
68
69       -background-color=colorname
70              Treat the specified color as the background color and ignore it.
71
72              If  you  don't  specify this option, pamtosvg does not recognize
73              any background color.
74
75              Specify the color (colorname) as described for the  argument  of
76              the ppm_parsecolor() library routine ⟨libppm.html#colorname⟩ .
77
78
79       -centerline
80              Trace an object's centerline.
81
82              By default, pamtosvg traces an object's outline.
83
84
85       -corner-always-threshold=angle
86              Consider  any angle at a pixel which falls below angle angle (in
87              decimal floating point degrees) as a corner, even if it is  bor‐
88              dered by other corner pixels.  Default is 60 degrees.
89
90
91       -corner-surround=integer
92              Consider  the  specified  number  of  pixels on either side of a
93              point when determining if that point is a corner.  Default is 4.
94
95
96       -corner-threshold=angle
97              Consider any pixel which forms an angle  with  its  predecessors
98              and  successors  that is smaller than angle (in decimal floating
99              point degrees) as a corner.  Default is 100.
100
101
102       -error-threshold=float
103              Subdivide fitted curves that are offset by a  number  of  pixels
104              exceeding the specified number.  Default is 2.0.
105
106
107       -filter-iterations=integer
108              Smooth  the curve the specified number of times prior to fitting
109              Default is 4.
110
111
112       -line-reversion-threshold=float
113              When a spline is closer to a straight line  than  the  specified
114              real number weighted by the square of the curve length, maintain
115              it as a straight line, even if it is a list with curves.
116
117              Default is .01.
118
119
120       -line-threshold=float
121              If a spline does not deviate from the straight line  defined  by
122              its  endpoints by more than the specified number of pixels, then
123              treat it as a straight line.
124
125              Default is 1.
126
127
128       -log   Send a detailed progress report to the file named inputfile.log,
129              where  inputfile  is  the  root of the input file name, or 'pam‐
130              tosvg' if the input is from Standard Input  or  a  file  with  a
131              weird name.
132
133
134       -preserve-width
135              Preserve  line  width  prior  to thinning.  Meaningful only with
136              -centerline.
137
138
139       remove-adjacent-corners
140              Remove adjacent corners.
141
142
143       -report-progress
144              Report the progress of the tracing to Standard Error as it  hap‐
145              pens.
146
147
148       -tangent-surround
149              Consider  the  specified  number  of  points to either side of a
150              point when computing the tangent at that point.  Default is 3.
151
152
153       -width-weight-factor
154              Weight factor for fitting the linewidth.
155
156
157
158
159

SEE ALSO

161       pnmquant(1),          pbmclean(1),          pnm(1),           Autotrace
162http://autotrace.sourceforge.net
163
164

HISTORY

166       pamtosvg was added to Netpbm in Version 10.33 (March 2006).
167
168       The  core  of  pamtosvg  -- the curve tracing logic -- was taken nearly
169       unmodified from Martin Weber's Autotrace program.  That program  dupli‐
170       cates a lot of Netpbm function, so pamtosvg is a much leaner program.
171
172       Bryan  Henderson created pamtosvg, basically just by adapting Autotrace
173       to Netpbm.
174
175       Autotrace was first released in 2000 and updates were released  through
176       2002.  A number of people wrote the code in it, but Masatake Yamato and
177       Martin Weber appear to be the principal creators of it.
178
179       As   of    June    2006,    there    was    a    Sourceforge    project
180http://autotrace.sourceforge.net⟩  for it.
181
182
183
184netpbm documentation             23 April 2006         Pamtosvg User Manual(0)
Impressum