Skip to content
Snippets Groups Projects
Commit c8a49a51 authored by Louis's avatar Louis :fire:
Browse files

Add README.md

parent 30f91cc2
No related branches found
No related tags found
No related merge requests found
Pipeline #199 passed with stage
in 35 seconds
# PNG to SVG
It converts png images to SVG vectors.
That'is it.
## Installation
### From Source
1. Clone this repository
2. Run "cargo build --release"
3. Copy `target/release/png_to_svg` to somewhere in your system's `$PATH`
### Prebuilt (Linux)
1. 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`
2. Copy `png_to_svg` to somewhere in your system's `$PATH`
## Usage
```bash
$: 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` and `svg` suffixes, respectively. Instead, the file types are assumed
- `-s` and `--scale` will set affect the `width`, `height`, and `viewbox` attributes of the root `<svg>` element, and the `x`, `y`, `width`, and `height` attributes of the pixel `rect` elements
- The file size of the SVG equivalent is quite large compared to the original PNG
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment