- image
3-layer RGB/4-layer RGBA array, rayimg class, matrix, or
filename of an image.
- pad
Default 10. Padding in pixels. Use a scalar for equal padding on
all sides, or c(top, right, bottom, left).
- color
Default "black". Padding color. Can be a scalar, RGB/RGBA
numeric vector, or R color string.
- alpha
Default NULL. Padding alpha for images with an alpha channel.
If NULL, uses the alpha channel supplied in color when present, otherwise
defaults to 0 when color is omitted and 1 when color is supplied.
Ignored for RGB and matrix inputs.
- filename
Default NULL. File to save the image to. If NULL and
preview = FALSE, returns the padded image.
- preview
Default FALSE. If TRUE, display the padded image.