Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anuj-kosambi/autosvg
Autosvg is tracing tool, which can convert image format like (jpg,png,gif) into vector
https://github.com/anuj-kosambi/autosvg
automatic autosvg convert image jpg jpg-to-svg png png-to-svg svg trace
Last synced: 3 months ago
JSON representation
Autosvg is tracing tool, which can convert image format like (jpg,png,gif) into vector
- Host: GitHub
- URL: https://github.com/anuj-kosambi/autosvg
- Owner: anuj-kosambi
- Created: 2020-05-23T11:34:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T07:49:58.000Z (over 1 year ago)
- Last Synced: 2024-05-28T14:24:35.430Z (6 months ago)
- Topics: automatic, autosvg, convert, image, jpg, jpg-to-svg, png, png-to-svg, svg, trace
- Language: JavaScript
- Homepage: https://autosvg.now.sh
- Size: 4.19 MB
- Stars: 111
- Watchers: 5
- Forks: 20
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- image2svg-awesome - autosvg
README
# AutoSvg
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
Autosvg is tracing tool, which can convert image format like (jpg,png,gif) into vector svg.
You can check your result here (Live Demo)[https://autosvg.now.sh].### Results
#### Clipart tracing
![Result-1](assets/results/result-1.png)
#### Logo tracing
![Result-2](assets/results/result-2.png)
#### Image tracing
![Result-3](assets/results/result-3.png)### Building AutoSVG-WASM.js
#### Prerequisite
- cmake, boost, python
- MacOS
```bash
> brew install cmake boost
```#### Automatic Setup
```bash
> git submodule update --init> sh build.sh
```#### Manual Setup
```bash
#
# https://github.com/emscripten-core/emsdk.git
#
export EMSDK=< path to Emscripten SDK repo>
#
# https://github.com/opencv/opencv.git
#
export OPENCV_SDK=
#
# https://github.com/dpilger26/NumCpp.git
#
export NUMCPP=
```- Build Emscripten
> https://emscripten.org/docs/getting_started/downloads.html- Build OpenCV WASM
```bash
cd $OPENCV_SDK
python ./platforms/js/build_js.py build_wasm --build_wasm
cd ../..
```- Run cmake building script for emscripten tool chain via
```bash
> cmake -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
```
- Run make command to complile source code and building WASM file.
```bash
> make
Scanning dependencies of target autosvg-wasm
[ 25%] Building CXX object CMakeFiles/autosvg-wasm.dir/src/cpp/AutosvgWASM.cpp.o
[ 50%] Building CXX object CMakeFiles/autosvg-wasm.dir/src/cpp/core/Operations.cpp.o
[ 75%] Building CXX object CMakeFiles/autosvg-wasm.dir/src/cpp/utils/CurveUtils.cpp.o
[100%] Linking CXX executable autosvg-wasm.js
[100%] Built target autosvg-wasm
```
- Copy wasm files to ui-app public folder.
```bash
cp autosvg-wasm.* src/autosvg_ui/public
```### Running AutoSVG-UI
```bash
> cd src/autosvg_ui/ && npm install
> npm run start
```## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!