read.picture {SoPhy} | R Documentation |
The function reads in TIF formated pictures and returns an RGB-A matrix, where A is the associated alpha matting information, if there is any (and identically 255 otherwise). If the format is different from TIF, it is first convert-ed to TIF.
read.picture(picture, extensions=c("tif", "tiff", if (.Platform$OS.type=="unix") c("gif", "jpeg")), PrintLevel=RFparameters()$Print, tmp.dir=".")
picture |
name of the graphic file, see details |
extensions |
standard extensions for the graphic file |
PrintLevel |
|
tmp.dir |
NULL or character.
The variable is used if the picture file does not end with ‘tif’ or
‘tiff’. Then the picture file is converted into a tif
file before being read in. The storage path is given by
tmp.dir . An existing tif file in tmp.dir is not
overwritten, but this file used instead and a warning is given.
|
The procedure of finding the graphic is the following.
If the file is neither TIF nor TIFF it is first convert-ed.
three-dimensional array, where the first two dimensions are the dimensions of the graphic, and the third dimension has length 4, for red, green, blue and alpha.
Martin Schlather, martin.schlather@math.uni-goettingen.de http://www.stochastik.math.uni-goettingen.de/institute
fig <- read.picture(paste(system.file(package='SoPhy'), 'tracer', 'K06', sep="/"), Pr=3) plotRGB(fig)