Learn R Programming

imager (version 0.14)

load.image: Load image from file or URL

Description

You'll need ImageMagick for formats other than PNG and JPEG. If the image is actually a video, you'll need ffmpeg. 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

Value

  • an object of class 'cimg'

Examples

Run this code
#Find path to example file from package
fpath <- system.file('extdata/Leonardo_Birds.jpg',package='imager')
im <- load.image(fpath)
plot(im)

Run the code above in your browser using DataLab