Description Usage Arguments Value See Also Examples
View source: R/read-any-bitmap.R
By default uses magic bytes at the start of the file to identify the image type (rather than the file extension). Currently uses readers in bmp, jpeg, png, and tiff packages.
1 | read.bitmap(f, channel, IdentifyByExtension = FALSE, ...)
|
f |
Path to image file |
channel |
Integer identifying channel to return for an RGB image |
IdentifyByExtension |
Identify by file extension only (Default FALSE) |
... |
Additional parameters passed to underlying image readers |
Objects returned by readJPEG
,
readPNG
, read.bmp
, or
readTIFF
. See their documentation for details.
image_type
, readJPEG
,
readPNG
, read.bmp
,
readTIFF
1 2 3 4 5 | img1=read.bitmap(system.file("img", "Rlogo.jpg", package="jpeg"))
str(img1)
img2 <- read.bitmap(system.file("img", "Rlogo.png", package="png"))
# nb the PNG image has an alpha channel
str(img2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.