if (FALSE) {
if (Sys.which("exiftool") != ""){ # only run this example if ExifTool is available
# copy sample images to temporary directory (so we don't mess around in the package directory)
wd_images_ID <- system.file(file.path("pictures", "sample_images_species_dir"),
package = "camtrapR")
file.copy(from = wd_images_ID, to = tempdir(), recursive = TRUE)
wd_images_ID_copy <- file.path(tempdir(), "sample_images_species_dir")
# define a sample tag
copyrightTagToAdd <- "Your Name (Your Organisation)"
# add the tag to the images
addCopyrightTag(inDir = wd_images_ID_copy,
copyrightTag = copyrightTagToAdd)
1 # we choose "YES", i.e., we want to add a copyright tag
# you can check the outcome with function exifTagNames
metadat <- exifTagNames(wd_images_ID_copy)
metadat [metadat$tag_name == "Copyright",]
}
}
Run the code above in your browser using DataLab