montage: Display frames as a montage

View source: R/montage.R

montageR Documentation

Display frames as a montage

Description

Arranges selected frames into a single composite image. Wraps magick::image_montage.

Usage

montage(
  images,
  geometry = NULL,
  tile = NULL,
  gravity = "Center",
  bg = "white",
  shadow = FALSE,
  frames = NULL
)

Arguments

images

an object of class magick-image to modify

geometry

a geometry string controlling the size and spacing of each tile, e.g. "64x64+2+2".

tile

a string specifying the grid layout, e.g. "5x2". Defaults to NULL, which lets ImageMagick choose.

gravity

anchor point for each tile's label and content: one of "Center", "North", "South", etc. Defaults to "Center".

bg

background colour string, e.g. "white".

shadow

logical. Whether to add a drop-shadow under each tile.

frames

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

Value

a magick-image object containing a single composite frame.

Examples


  dino_dir <- system.file("extdata", package = "stopmotion")
  images <- read(dir = dino_dir)
  montage(images)
  montage(images, frames = 1:4, tile = "4x1", geometry = "128x128+4+4")


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