Take screenshot of html image tile
Usage
snap_tile(
output_path,
screen_width = 800,
screen_height = 700,
dark_mode = FALSE,
output_dir = getwd()
)Arguments
- output_path
Path to image file
- screen_width
Width of the browser window
- screen_height
Height of the browser window
- dark_mode
Is the tile being saved dark or light mode?
- output_dir
Directory where
make_tile()wrote its files. Must match theoutput_dirused in the precedingmake_tile()call. Defaults togetwd(). To snap a tile written totempdir(), passoutput_dir = tempdir()explicitly.
Examples
if (FALSE) { # file.exists(file.path(getwd(), "temp_hexsession", "_hexout.html")) && isTRUE(nzchar(tryCatch(chromote::find_chrome(), error = function(e) "")))
snap_tile(tempfile(fileext = ".png"))
}
