Title: | Convert SVG to PNG Images |
---|---|
Description: | Lightweight SVG to PNG renderer based on resvg. |
Authors: | Jeroen Ooms [aut, cre] |
Maintainer: | Jeroen Ooms <jeroenooms@gmail.com> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-10-12 12:41:32 UTC |
Source: | https://github.com/jeroen/minisvg |
Converts an svg string to a PNG image using resvg.
svg_to_png(svg, opts = list(), output = "output.png")
svg_to_png(svg, opts = list(), output = "output.png")
svg |
string or raw vector with svg image |
opts |
list with rendering options |
output |
filename of png file |
svg <- readLines("https://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg") svg_to_png(svg, output = 'tiger.png') # browseURL('tiger.png') unlink('tiger.png')
svg <- readLines("https://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg") svg_to_png(svg, output = 'tiger.png') # browseURL('tiger.png') unlink('tiger.png')