Update
This commit is contained in:
parent
3df9d2aa2c
commit
b3fc18e61a
45
README.md
45
README.md
|
|
@ -1,3 +1,44 @@
|
||||||
# Raster2SVG-Studio
|
# Raster2SVG Studio
|
||||||
|
|
||||||
|
A Python tool (CLI + GUI) that converts raster images to SVG using selectable styles.
|
||||||
|
Initial styles:
|
||||||
|
- Posterized (flat color regions)
|
||||||
|
- Line-art (binary edge/ink look)
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
- Python 3.10+
|
||||||
|
- Qt: PySide6
|
||||||
|
- OpenCV: opencv-python
|
||||||
|
- NumPy
|
||||||
|
- svgwrite
|
||||||
|
Optional (for best SVG preview quality in GUI):
|
||||||
|
- cairosvg
|
||||||
|
|
||||||
|
## Install (editable)
|
||||||
|
```bash
|
||||||
|
cd raster2svg-studio
|
||||||
|
python -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip install -U pip
|
||||||
|
pip install -e .
|
||||||
|
````
|
||||||
|
|
||||||
|
## CLI usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
r2s convert --in input.jpg --out out.svg --style posterized --params '{"n_colors":6,"min_area":80,"simplify":1.2}'
|
||||||
|
r2s convert --in input.jpg --out out.svg --style lineart --params '{"mode":"adaptive","block_size":31,"c":7,"min_area":40,"simplify":1.0}'
|
||||||
|
```
|
||||||
|
|
||||||
|
## GUI usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
r2s gui
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
* SVG preview in the GUI is rendered by converting SVG -> PNG in memory.
|
||||||
|
If `cairosvg` is not installed, the preview falls back to showing the processed raster stage.
|
||||||
|
* This scaffold is designed to add a "woodcut" style next (edges + hatching).
|
||||||
|
|
||||||
A Python tool (CLI + GUI) that converts raster images to SVG using selectable styles.
|
|
||||||
Loading…
Reference in New Issue