convertSVGtoTarget: Convert a SVG image to different image type using imagemagick

View source: R/plotting_misc.R

convertSVGtoTargetR Documentation

Convert a SVG image to different image type using imagemagick

Description

This function takes in an svg file name and converts that image to a different format using imagemagick. 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

convertSVGtoTarget(svg.file.name, im.width = 1000, target = "jpg", debug = F)

Arguments

im.width

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

target

Optional: The extension of the output file, defaults to .jpg

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()
convertSVGtoTarget(svg.file,target="jpg")

## End(Not run)

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