https://github.com/rametta/cute-svg
📸 Cute SVG's from images
https://github.com/rametta/cute-svg
cute image svg
Last synced: 11 months ago
JSON representation
📸 Cute SVG's from images
- Host: GitHub
- URL: https://github.com/rametta/cute-svg
- Owner: rametta
- License: apache-2.0
- Created: 2018-10-09T11:55:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-16T01:29:19.000Z (over 7 years ago)
- Last Synced: 2025-03-28T23:53:01.313Z (over 1 year ago)
- Topics: cute, image, svg
- Language: JavaScript
- Homepage: https://cute-svg.surge.sh/
- Size: 280 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](http://npm.im/cute-svg)
[](http://makeapullrequest.com)
[](https://github.com/rametta/cute-svg/)
[](https://opensource.org/licenses/Apache-2.0)
# 📸 Cute SVG
Image optimizer by converting to SVG. [Demo](https://cute-svg.surge.sh/)
## Install
`yarn add cute-svg`
## Usage
```js
const cute = require('cute-svg')
const fs = require('fs')
const inputFile = __dirname + '/sample.jpg'
const outputFile = __dirname + '/output.json'
cute({ filePath: inputFile })
.then(svg => fs.writeFileSync(outputFile, svg))
.catch(e => console.log(e))
// OUTPUT
// { tracedSvg: String, aspectRatio: Number }
```
## Example
### From this:
133kb

### To this:
36kb
