convertPicture: Convert a vector image into Cairo PostScript or SVG.

Description Usage Arguments Details Value Author(s)

Description

In order to read in an image, grImport and grImport2 first require that the images they read in are their target input formats. In the case of grImport it is simply a PostScript image, while grImport2 requires an SVG image that has been generated by the Cairo graphics library. This function provides an interface for performing the conversion from a source vector image format to Cairo-generated PostScript or SVG.

Usage

1
2
3
convertPicture(file, outfile,
               inputFormat = NA, outputFormat = NA,
               pagenum = 1L)

Arguments

file

A character vector representing the path to the input file.

outfile

A character vector representing the path to the output file.

inputFormat

A character vector representing the input image format. Must be one of "ps", "eps", "pdf" or "svg". If this parameter is NA then an attempt will be made to determine the image format automatically.

outputFormat

A character vector representing the output image format. Must be one of "ps", "eps", or "svg". If this parameter is NA then an attempt will be made to determine the image format automatically.

pagenum

When using an input format with multiple pages present (e.g. PostScript or PDF), then this parameter determines which page will be converted to Cairo SVG.

Details

When installing this package, it is not strictly necessary to have all of the image renderers available. In the case that only some of the renderers are installed, the function may provide an error message when the appropriate renderer is not available. For example, this may occur if it is not possible to render SVG images and yet the input file to this function is an SVG image.

Value

None. The side effect is that a new PostScript or SVG image is created.

Author(s)

Simon Potter


sjp/grConvert documentation built on May 30, 2019, 12:06 a.m.