png2svg(1)
π png2svg β the glow-up your tiny PNGs deserve π
okay bestie, so this is a User Commands page from section 1 of the manual, and it's about png2svg(1) β the little tool that takes your cute pixel art and turns it into fancy scalable vector art. i got you, sit down, grab a strawberry π
β¨ NAME β¨
png2svg β converts PNG images into SVG Tiny 1.2. no cap, that's the whole job description π
π¦ SYNOPSIS π¦
png2svg [OPTIONS] input.png
one input, a pile of options, she does the thing. periodt.
πΈ DESCRIPTION πΈ
so here's the tea: png2svg takes small PNG images and converts them into SVG Tiny 1.2. how? by drawing a rectangle for every region that can be covered by a single rectangle β like, she's out here doing the least amount of work possible, which is honestly iconic behavior π
the pixels that can't get grouped into a nice big rectangle? those get their own rectangle, one per pixel. no pixel left behind, fr fr.
transparent PNGs are handled, because she's not rude: the transparent regions just don't get any SVG elements drawn for them at all. nothing to see there, literally π
and the resulting SVG images? you can open them straight up in a browser and they stay crisp when you scale them up, which is lowkey the entire reason you'd do this β it's giving pixel art and icons, major main character energy β¨
π OPTIONS π
-oFILENAME β names the SVG output file. use-and it goes to stdout instead, which is also the default π-nN β shrinks the palette down to N colors before the conversion even starts. vibe check your color count first π¨-lβ caps colors at a maximum of 4096, the way that it shortens the strings too:#abcdefβ#ace. shorter, cuter, valid π-pβ only single pixel rectangles. one rectangle per pixel, no grouping, no shortcuts, just raw pixel-by-pixel honesty π-cβ colors the expanded rectangles pink so you can see what's going on. it's for debugging, but ngl it's also just a slay aesthetic πΈ-qβ deprecated. same as-l. she's retired, don't @ her π-zβ deprecated. also same as-l. also retired. throwbacks only π«Ά-vβ verbose output, so she tells you her progress like a good bestie keeping you updated π¬-Vor--versionβ prints the version and exits. immediate, efficient, obsessed π
β EXAMPLES β
okay so these are the actual glow-up recipes, copy them exactly:
generate an SVG image with as few rectangles as possible:
png2svg -o output.svg input.png
generate an SVG image with one rectangle per pixel:
png2svg -p -o output.svg input.png
limit to 4096 unique colors, with verbose output:
png2svg -v -l -o output.svg input.png
reduce to 32 colors and limit color strings:
png2svg -v -l -n 32 -o output.svg input.png
π NOTES π
real talk time. the conversion is fast for small images β adorable, instant, chef's kiss. but for larger images it will take an unreasonable amount of time to convert, and it'll spit out SVG files that are many megabytes in size. so like. know what you're getting into, bestie, this is not the tool for your 4K screenshots π
the resulting SVG files can be further optimized with tools like svgo though, so you can always hand it off for a second round of self-care β¨
π₯ SEE ALSO π₯
go read that one next, iykyk π§
π VERSION π
1.7.1
π LICENSE π
BSD-3
π AUTHOR π
png2svg was written by Alexander F. RΓΈdseth <xyproto@archlinux.org> β thank you for your service, king π«Ά
and that's the whole page, bestie!! this manual page is from 28 May 2026, source png2svg, so if you see that date, that's the vibe. run her, love her, scale her up forever πβ¨ππ¦πΈ
π¦ where this page comes from
- ubuntu stonking: png2svg 1.7.1-1 Β· BSD-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms