Debian Codegraph @

png2svg.1

raw
1 .\" -*-Nroff-*-
2 .\"
3 .TH "png2svg" 1 "28 May 2026" "png2svg" "User Commands"
4 .SH NAME
5 png2svg \- convert PNG images to SVG Tiny 1.2
6 .SH SYNOPSIS
7 .B png2svg
8 [\fIOPTIONS\fP] \fIinput.png\fP
9 .sp
10 .SH DESCRIPTION
11 Convert small PNG images to SVG Tiny 1.2 by drawing rectangles for each region
12 that can be covered by a single rectangle. The remaining pixels are drawn with a
13 rectangle per pixel.
14 .sp
15 Handles transparent PNG images by not drawing SVG elements for the transparent regions.
16 .sp
17 The resulting SVG images can be opened directly in a browser and will look crisp
18 when scaled up, which is useful for pixel art and icons.
19 .sp
20 .SH OPTIONS
21 .sp
22 .TP
23 .B \-o \fIFILENAME\fP
24 SVG output filename. Use \fB\-\fP for stdout (default).
25 .TP
26 .B \-n \fIN\fP
27 Reduce the palette to N colors before conversion.
28 .TP
29 .B \-l
30 Limit colors to a maximum of 4096 (#abcdef \(-> #ace).
31 .TP
32 .B \-p
33 Use only single pixel rectangles (one rectangle per pixel).
34 .TP
35 .B \-c
36 Color expanded rectangles pink (for debugging).
37 .TP
38 .B \-q
39 Deprecated (same as \fB\-l\fP).
40 .TP
41 .B \-z
42 Deprecated (same as \fB\-l\fP).
43 .TP
44 .B \-v
45 Verbose output, showing progress information.
46 .TP
47 .B \-V or \-\-version
48 Print the version and exit.
49 .PP
50 .SH EXAMPLES
51 .sp
52 Generate an SVG image with as few rectangles as possible:
53 .sp
54 .RS
55 png2svg \-o output.svg input.png
56 .RE
57 .sp
58 Generate an SVG image with one rectangle per pixel:
59 .sp
60 .RS
61 png2svg \-p \-o output.svg input.png
62 .RE
63 .sp
64 Limit to 4096 unique colors, with verbose output:
65 .sp
66 .RS
67 png2svg \-v \-l \-o output.svg input.png
68 .RE
69 .sp
70 Reduce to 32 colors and limit color strings:
71 .sp
72 .RS
73 png2svg \-v \-l \-n 32 \-o output.svg input.png
74 .RE
75 .sp
76 .SH NOTES
77 The conversion is fast for small images, but larger images will take an
78 unreasonable amount of time to convert, creating SVG files many megabytes in
79 size.
80 .sp
81 The resulting SVG files can be further optimized with tools like \fBsvgo\fP.
82 .sp
83 .SH "SEE ALSO"
84 .BR svgo (1)
85 .SH VERSION
86 1.7.1
87 .SH LICENSE
88 BSD-3
89 .SH AUTHOR
90 .B png2svg
91 was written by Alexander F. Rødseth <[email protected]>