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       Minimum  unique abbreviation of option is acceptable.  You may use dou‐
21       ble hyphens instead of single hyphen to denote options.   You  may  use
22       white space in place of the equals sign to separate an option name from
23       its value.
24
25

DESCRIPTION

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

OPTIONS

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

Application Notes

160       A  convenient  way to view an SVG document is with a web browser.  Many
161       understand a file whose name ends in ".svg" to be an SVG image and  can
162       render it.
163
164
165

SEE ALSO

167       pnmquant(1),           pbmclean(1),          pnm(1),          Autotrace
168http://autotrace.sourceforge.net
169
170

HISTORY

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

DOCUMENT SOURCE

189       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
190       source.  The master documentation is at
191
192              http://netpbm.sourceforge.net/doc/pamtosvg.html
193
194netpbm documentation             23 April 2006         Pamtosvg User Manual(0)
Impressum