Skip to contents

Programatically save and crop gt tables using magick. Uses gtsave_extra to save the image and magick to crop it.

Usage

gt_save_crop(
  data,
  file = NULL,
  bg = "white",
  whitespace = 50,
  zoom = 2,
  expand = 5
)

Arguments

file

A valid path to a .png, .jpg, or .jpeg to crop

bg

The background color of the added trimming (defaults to white)

whitespace

A numeric representing the amount of whitespace to leave around the image

Value

Returns a cropped image file