Learn R Programming

imager (version 0.20)

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

Description

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

Usage

"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