image_load | R Documentation |
Load PNG, JPG, BMP or GIF from disk or URL.
image_load(file)
file |
character, file name. A local file or URL. Extension must be one of
|
The function will prompt you of the need to install a format-specific package
if not installed and needed for the given file
extension; png
, bmp
,
magick
(for GIF). jpeg
is already imported for purpose of running examples.
an RBG array
x <- paste0(system.file(package = "imgpalr"), "/blue-yellow.",
c("jpg", "png", "bmp", "gif"))
str(image_load(x[1]))
if(require(png)) str(image_load(x[2]))
if(require(bmp)) str(image_load(x[3]))
if(require(magick)) str(image_load(x[4]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.