https://github.com/universaldatatool/svg-mask-render
Render SVG masks to pngs consistently, without anti-aliasing or blurry edges!
https://github.com/universaldatatool/svg-mask-render
Last synced: 1 day ago
JSON representation
Render SVG masks to pngs consistently, without anti-aliasing or blurry edges!
- Host: GitHub
- URL: https://github.com/universaldatatool/svg-mask-render
- Owner: UniversalDataTool
- Created: 2020-09-09T17:54:59.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-28T21:57:00.000Z (over 5 years ago)
- Last Synced: 2024-10-29T18:40:00.360Z (over 1 year ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SVG Render Mask | Portable SVG Mask Rendering
> This library is in beta, but being used by the Universal Data Tool. Contributions are appreciated!
Render SVGs on node and web. Uses [node-pureimage](https://github.com/joshmarinacci/node-pureimage) and [canvg](https://github.com/canvg/canvg).
Existing libraries often had problems with serverless platforms, inconsistency across machines, forced anti-aliasing or unnecessary complexity.
## Usage
`npm install svg-render`
```javascript
const render = require("svg-render")
render(svgText, { output: "pngbuffer" }).then((pngBuffer) => {
// fs.writeFile("./myImage.png", pngBuffer)
})
```
## TODO
- [] Font Support