Use magick::image_ggplot()
to make contact sheets for images
Source: R/make_contact_sheets.R
make_contact_sheets.Rd
Wraps filenamr::read_exif()
, magick::image_ggplot()
, and page_layout()
to create contact shets for a folder of images.
Usage
make_contact_sheets(
images,
dims = NULL,
ncol = NULL,
nrow = NULL,
captions = "{file_name}\n{date_created}",
caption_size = 12,
caption_position = "panel",
image_margin = margins(0.1, unit = "in"),
page = "letter",
orientation = "portrait",
image_max = NULL,
image_fileext = NULL,
tags = NULL,
tz = NULL,
save = FALSE,
filename = NULL,
...
)
Arguments
- images
File path or data.frame from
filenamr::read_exif()
- dims
Image dimensions in same dimensions as page. Required.
- ncol, nrow
The dimensions of the grid to create. If both are
NULL
, dims will be used or dims will be determined based on the plot dimensions.Template for caption, passed to
glue::glue_data()
using the images data.frame as .x. Note that this template may vary if you are using a custom tags parameter or modify the "filenamr.exif_xwalk" option. Seefilenamr::read_exif()
for more details. Default: "{file_name}\n{date_created}"Caption size, passed to
ggplot2::element_text()
for plot.caption for theme, Default: 12Caption position, passed to plot.caption.position for theme, Default: 'panel'
- image_margin
Image margin passed Default:
margins(0.1, unit = "in")
- page
Paper name or a data.frame with width and height columns. Optional if width and height are both provided, Default:
NULL
- orientation
Paper orientation, Optional if width and height are both provided, Default: 'landscape'
- image_max
Maximum number of images to use for contact sheets.
- image_fileext
Passed to fileext parameter of
filenamr::read_exif()
, Default:NULL
List of EXIF tags to read from files. If
NULL
(default), set to option "filenamr.exif_tags" or defaultdefault_exif_tags
.- tz
Time zone to pass to
lubridate::ymd_hms()
if format_exif isTRUE
. Typically set toSys.timezone()
to convert date/time columns.- save
If
TRUE
, save contact sheet to a file. filename may be required if save isTRUE
. Default:FALSE
- filename
File name to create on disk.
- ...
Additional parameters passed to
map_ggsave_ext()
excluding width, height, and units.