| ct_read_metadata | R Documentation |
Extracts metadata from image files using ExifTool and returns the results as a tibble.
ct_read_metadata(
path,
tags = NULL,
recursive = FALSE,
parse_hs = FALSE,
args = NULL,
exiftool_path = NULL
)
path |
Character vector of image file paths or a directory path. |
tags |
Character vector of tag names to extract. Use:
|
recursive |
Logical. If |
parse_hs |
Logical. If |
args |
Character vector of additional arguments passed directly to
ExifTool (e.g., |
exiftool_path |
Character. Path to the ExifTool executable. If
|
By default, all available tags are returned. You can limit the output to a predefined set of tags or provide a custom list of tag names.
This function calls ExifTool with CSV output enabled and numeric values
returned where applicable. When parse_hs = TRUE, the
HierarchicalSubject field is split into structured columns.
A tibble where each row represents one image file and each column represents a metadata field.
ct_get_hs() to retrieve hierarchical subjects
ct_create_hs() to add hierarchical subjects
ct_remove_hs() to remove hierarchical subjects
## Not run:
# Example image path
image_path <- file.path(system.file("img", package = "ct"), "large.jpeg")
# Extract all metadata
ct_read_metadata(path = image_path)
# Extract a predefined standard set of metadata
ct_read_metadata(path = image_path, tags = "standard")
# Extract custom tags
ct_read_metadata(path = image_path,
tags = c("DateTimeOriginal", "GPSLatitude", "GPSLongitude"))
# Parse hierarchical subject fields into columns
ct_read_metadata(path = image_path,
tags = "standard",
parse_hs = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.