| newPixmapRGB {rtiff} | R Documentation |
A utility function to create an RGB pixmap object out of 3 rasters.
newPixmapRGB(red = NULL, green = NULL, blue = NULL)
red |
The red raster (a matrix) |
green |
The green raster (a matrix) |
blue |
The blue raster (a matrix) |
An object of type pixmap representing the resulting RGB image.
Eric Kort <eric.kort@vai.org>
#this is tautological, but demonstrates the syntax...
library(rtiff)
tif <- readTiff(paste(.path.package("rtiff"), "/tiff/jello.tif", sep=""))
myPixmap <- newPixmapRGB(tif@red, tif@green, tif@blue)
plot(myPixmap)
#let's scramble the color channels just for fun
get(getOption("device"))()
myPixmap <- newPixmapRGB(tif@blue, tif@red, tif@green)
plot(myPixmap)