convertSVGtoPNG: Convert a SVG image to PNG using imagemagick

View source: R/plotting_misc.R

convertSVGtoPNGR Documentation

Convert a SVG image to PNG using imagemagick

Description

This function takes in an svg file name and converts that image to a png. This function assumes that imagemagick has been installed and that "convert" is available at the command line. This function also assumes that the svg file has the string '.svg' present at the end of the of the svg file

Usage

convertSVGtoPNG(svg.file.name, im.width = 1000, debug = F)

Arguments

im.width

Optional: Specifies the output width of the png file, defaults to 1000

debug

Optional: Print out imagemagick convert command

svg.file.name:

The location of the svg file

Examples

## Not run: 
svg.file = 'test.svg';
svg(svg.file)
plot(1:10)
graphics.off()
convertSVGtoPNG(svg.file)

## End(Not run)

mbergins/BerginskiRMisc documentation built on Aug. 5, 2022, 4:16 a.m.