Skip to contents

Rasterize a grob object with magick

Usage

magickGrob(
  grob,
  magick = NULL,
  ...,
  res = NULL,
  interpolate = FALSE,
  name = NULL,
  vp = NULL
)

Arguments

grob

A grob(). Use patch() to convert any objects into a grob.

magick

A function (purrr-style formula is accepted) that takes an image_read() object as input and returns an object compatible with as.raster(). You can use any of the image_*() functions from the magick package to process the raster image.

...

These dots are for future extensions and must be empty.

res

An integer sets the desired resolution in pixels.

interpolate

A logical value indicating whether to linearly interpolate the image (the alternative is to use nearest-neighbour interpolation, which gives a more blocky result).

name

A character identifier.

vp

A Grid viewport object (or NULL).

Value

A magickGrob object.