Description Usage Arguments Value Examples
Objects representing raster image data.
The class RImage has two subclasses SImage (for single channel images) and MImage (for multiple channel images).
Currently, pixel values (im) need to be between zero and one.
NOTE:
INTERNAL STRUCTURE OF OBJECTS IS SUBJECT TO CHANGE.
DO NOT USE SLOTS, DIRECTLY.
NOTE:
USING NON-sRGB COLOR SPACES REQUIRES THE colorspace PACKAGE TO BE INSTALLED AND LOADED.
Also, note that there's also a VImage object, which uses vector graphics.
1 2 3 4 |
im |
For SImage: |
input, storage |
Single characters, giving the name of a valid color space from the colorspace package. |
which |
Integer, which channel. |
as.matrix |
Logical, if false (default), return an SImage object, If true, return a matrix. |
... |
Ignored. |
An SImage, MImage or matrix object.
1 2 3 4 5 6 7 8 9 10 11 | library (png)
#adapted from png package
im0 <- readPNG (system.file ("img", "Rlogo.png", package="png") )
#multichannel image
im <- as.MImage (im0)
plot (im)
headt (as.raster (im) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.