Learn R Programming

imager (version 0.14)

as.raster.cimg: Convert a cimg object to a raster object

Description

raster objects are used by R's base graphics for plotting

Usage

## S3 method for class 'cimg':
as.raster(x, frames, rescale.color = TRUE, ...)

Arguments

x
an image (of class cimg)
frames
which frames to extract (in case depth > 1)
rescale.color
rescale so that pixel values are in [0,1]? (subtract min and divide by range). default TRUE
...
ignored

Value

  • a raster object

See Also

plot.cimg, rasterImage