UniversalDataTool / svg-mask-render

Render SVG masks to pngs consistently, without anti-aliasing or blurry edges!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 and canvg.

Existing libraries often had problems with serverless platforms, inconsistency across machines, forced anti-aliasing or unnecessary complexity.

Usage

npm install svg-render

const render = require("svg-render")

render(svgText, { output: "pngbuffer" }).then((pngBuffer) => {
  // fs.writeFile("./myImage.png", pngBuffer)
})

TODO

  • [] Font Support

About

Render SVG masks to pngs consistently, without anti-aliasing or blurry edges!


Languages

Language:JavaScript 100.0%