border: Add a border to images

View source: R/border.R

borderR Documentation

Add a border to images

Description

Adds a coloured border around selected frames. Wraps magick::image_border.

Usage

border(images, color = "lightgray", geometry = "10x10", frames = NULL)

Arguments

images

an object of class magick-image to modify

color

a character string specifying the border colour, e.g. "black" or "#FF0000".

geometry

a geometry string specifying border width and height, e.g. "10x10" for a 10-pixel border on all sides.

frames

integer vector of frame indices to duplicate. Defaults to NULL, which duplicates all frames.

Value

a magick-image object

Verbosity

After each operation a message listing the updated frame sequence is printed in interactive sessions. Use stopmotion_verbosity(FALSE) to suppress these messages, or set options(stopmotion.verbose = FALSE) in your script or ‘.Rprofile’.

Examples


  dino_dir <- system.file("extdata", package = "stopmotion")
  images <- read(dir = dino_dir)
  border(images = images, color = "black", geometry = "5x5")
  border(images = images, color = "white", geometry = "10x10", frames = 1:3)


stopmotion documentation built on March 24, 2026, 5:06 p.m.