load.image: Load image from file or URL

View source: R/loading.R

load.imageR Documentation

Load image from file or URL

Description

PNG, JPEG and BMP are supported via the readbitmap package. You'll need to install ImageMagick for other formats. If the path is actually a URL, it should start with http(s) or ftp(s).

Usage

load.image(file)

Arguments

file

path to file or URL

Value

an object of class 'cimg'

Examples


#Find path to example file from package
fpath <- system.file('extdata/Leonardo_Birds.jpg',package='imager') 
im <- load.image(fpath)
plot(im)
#Load the R logo directly from the CRAN webpage
#load.image("https://cran.r-project.org/Rlogo.jpg") %>% plot

imager documentation built on May 29, 2024, 1:38 a.m.