iminfo: Return information on image file

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

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

1
iminfo(fname)

Arguments

fname

path to a file

Value

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

Author(s)

Simon Barthelme

Examples

1
2
3
4
5
6
7
## Not run: 
someFiles <- dir("*.png") #Find all PNGs in directory
iminfo(someFiles[1])
#Get info on all files, as a data frame
info <- plyr::ldply(someFiles,function(v) iminfo(v) %>% as.data.frame) 

## End(Not run)

imager documentation built on May 29, 2017, 8:46 p.m.

Search within the imager package
Search all R packages, documentation and source code