exifTagNames: Show Exif metadata of JPEG images or other image or video...

View source: R/exifTagNames.R

exifTagNamesR Documentation

Show Exif metadata of JPEG images or other image or video formats


The function will return metadata values, metadata tag names and group names of Exif metadata of JPEG images or other formats.


  whichSubDir = 1,
  returnMetadata = "DEPRECATED",
  returnTagGroup = "DEPRECATED"



character. Directory containing camera trap images sorted into station subdirectories (e.g. inDir/StationA/)


integer or character. Either number or name of subdirectory of inDir in which to look for an image


character. A filename, either the file name of an image in inDir or a full path with file name (in which case inDir is not needed)


deprecated and ignored


deprecated and ignored


Many digital cameras record information such as ambient temperature or moon phase under maker-specific tag names in Exif metadata of JPEG images. In addition, many technical information are stored in Exif metadata. In order to extract those information from images and add them to the record tables created by the functions recordTable and recordTableIndividual, the tag names must be known so they can be passed to these functions via the additionalMetadataTags argument.

By default the function returns both metadata tag names and the metadata group they belong to (via argument returnTagGroup). This is helpful to unambiguously address specific metadata tags, because different groups can contain tags of identical names, which may cause problems executing the functions recordTable and recordTableIndividual. The format is "GROUP:tag", e.g. "EXIF:Flash".


A data frame containing three columns: metadata tag group, tag name, and values.


Juergen Niedballa


Phil Harvey's ExifTool https://exiftool.org/

See Also



## Not run: 

wd_images_ID <- system.file("pictures/sample_images_species_dir", package = "camtrapR")

# specify directory, camtrapR will automatically take first image from first subdirectory
exifTagNames(inDir          = wd_images_ID)

# specify subdirectory by name, camtrapR will use first image
exifTagNames(inDir          = wd_images_ID,
             whichSubDir    = "StationA")

# specifying fileName only (line break due to R package policy)
exifTagNames(fileName       = file.path(wd_images_ID, "StationC", "TRA", 
# specify inDir and fileName
exifTagNames(inDir          = wd_images_ID,
             fileName       = file.path("StationC", "TRA", "StationC__2009-05-02__00-10-00(1).JPG"))
# it also works this way
exifTagNames(inDir          = file.path(wd_images_ID, "StationC", "TRA"),
             fileName       = "StationC__2009-05-02__00-10-00(1).JPG")

# with tagged sample images
wd_images_ID_tagged <- system.file("pictures/sample_images_indiv_tag", package = "camtrapR")
exifTagNames(inDir          = wd_images_ID_tagged)

## End(Not run)

camtrapR documentation built on May 29, 2024, 6:45 a.m.