Create a set of options controlling how plot inputs (ggplot objects,
plotting functions and recorded plots) are rendered to PNG before being
compared by compare_images(), expect_images_match(),
expect_images_differ() and expect_snapshot_image().
Details
Plots are rendered with ragg::agg_png() when the ragg package is
installed (recommended: its output is consistent across platforms), and
with grDevices::png() otherwise. When comparing a plot against a stored
baseline PNG, render it with the same options (and the same graphics
device) that were used to create the baseline, or the comparison will fail
with a layout difference.
