An open API service indexing awesome lists of open source software.

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!

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