Create standard raster objects from RImage (SImage and MImage) objects, from this package.
as.raster.SImage (x, …, optfit=FALSE,
colf = vt3.linear.shader (reverse=invert),
invert=TRUE)as.raster.MImage (x, …, which, invert.gs=TRUE)
An RImage object.
Integer, which channel. If missing, all channels are used.
Logical, if true, reverse the colors. In MImage, ignored, except for GS and GS-A (one and two channel images), or single-channel images via the which arg.
Logical, if true, fit colors to a reduced interval (min value to max value), increasing the visible color variation.
A function that maps a numeric matrix to a character matrix of R colors. This includes a shader function from this package.
Ignored.
Refer to above link for example.