PNG to SVG
It converts png images to SVG vectors.
That'is it.
Installation
From Source
- Clone this repository
- Run "cargo build --release"
- Copy
target/release/png_to_svg
to somewhere in your system's$PATH
Prebuilt (Linux)
- Use your favourite method (curl, wget, browser, etc) to download the latest binary:
https://lab.lcr.gr/microhacks/png-to-svg/-/jobs/artifacts/trunk/raw/png_to_svg?job=build:application
- Copy
png_to_svg
to somewhere in your system's$PATH
Usage
$: png_to_svg --help
Convert RGBA8 PNG images into SVGs, where each pixel of input creates one output rect
Usage: png_to_svg [OPTIONS] <INPUT_FILE> <OUTPUT_FILE>
Arguments:
<INPUT_FILE>
<OUTPUT_FILE>
Options:
-s, --scale <SCALE> Set the size of each output pixel; creates an NxN rect for each input pixel where N is the scale [default: 1]
-h, --help Print help information
-V, --version Print version information
Notes
- The input and output files do not need to have
png
andsvg
suffixes, respectively. Instead, the file types are assumed -
-s
and--scale
will set affect thewidth
,height
, andviewbox
attributes of the root<svg>
element, and thex
,y
,width
, andheight
attributes of the pixelrect
elements - The file size of the SVG equivalent is quite large compared to the original PNG