Learn R Programming

imager (version 0.42.19)

iminfo: Return information on image file

Description

This function calls ImageMagick's "identify" utility on an image file to get some information. You need ImageMagick on your path for this to work.

Usage

iminfo(fname)

Value

a list with fields name, format, width (pix.), height (pix.), size (bytes)

Arguments

fname

path to a file

Author

Simon Barthelme

Examples

Run this code
if (FALSE) {
someFiles <- dir("*.png") #Find all PNGs in directory
iminfo(someFiles[1])
#Get info on all files, as a data frame
info <- purrr::map_df(someFiles,function(v) iminfo(v) %>% as.data.frame)
}

Run the code above in your browser using DataLab