section_df: Read section data into a data.frame

Description Usage Arguments Details Value See Also Examples

View source: R/section_df.R

Description

This function will create a data.frame with rows for each of the requested files and columns for the different section properties.

Usage

1
2
3
4
5
6
7
section_df(
  files,
  extract = NULL,
  silent_errors = FALSE,
  allow_multiple = FALSE,
  ...
)

Arguments

files

A character vector containing paths to jpeg files.

extract

To specify which sections to extract, you may provide the marker number, the section name, the section ID, or a function that will take a section and return TRUE for the section you want to extract.

silent_errors

If TRUE, no errors are triggered when processing files but an "Error" column is added to the output if an error occurs

allow_multiple

The default (FALSE) will only return the first matching section from each file. Set to TRUE to allow multiple matches per file

...

Options passed to as.data.frame.jpeg_section

Details

This is only useful for a few sections like APP0 or SOF where the data is in a standard format. Data for most other sections are not parsed.

Note that the Exif tags will not be included in the data.frame. If you wish to extract the Exif data, use exif_df() instead.

Value

A data.frame

See Also

exif_df()

Examples

1
2
3
4
5
sample_dir <- system.file("extdata", package="readexif")
sample_files <- list.files(sample_dir, pattern="\\.jpg$", full.names = TRUE)
# Get all the Start of Frame (SOF) sections to get
# image heights and widths
section_df(sample_files, "SOF")

MrFlick/readexif documentation built on Dec. 17, 2021, 4:22 a.m.