Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hallss93/svg-to-png-lite
Converter SVG para PNG.
https://github.com/hallss93/svg-to-png-lite
Last synced: 10 days ago
JSON representation
Converter SVG para PNG.
- Host: GitHub
- URL: https://github.com/hallss93/svg-to-png-lite
- Owner: hallss93
- Created: 2019-06-26T13:28:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-27T11:50:08.000Z (over 5 years ago)
- Last Synced: 2024-12-20T05:28:29.736Z (about 1 month ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# svg-to-png-lite
> Converter SVG para PNG.
## Como iniciar
_Start:_
1. Instale a dependência com `npm i --save svg-to-png-lite`
2. Importe a biblioteca:
````javascript
import svgpng from 'svg-to-png-lite';
````
Exemplo 1:
````javascript
// Passe o ID do SVG
svgpng("svg-id").then(console.log).catch(console.error)
````Exemplo 2:
````javascript
// Determinando Width e Height - Passando ID e Opções
svgpng("svg-id", {width:300, height:300}).then(console.log).catch(console.error)
````
## OPÇÕES### WIDTH `Number`. Default `largura do SVG`
Determina a largura da imagem.
### HEIGHT `Number`. Default `altura do SVG`
Determina a altura da imagem.
### EXT `String`. Default `PNG`
Determina a extensão da imagem\: PNG ou JPEG