Skip to contents

Joining multiple images into a single one

Usage

image_combine(
  fps,
  output = NULL,
  stack = FALSE,
  height = NULL,
  width = NULL,
  sep_fct = 0.1,
  background = "transparent"
)

Arguments

fps

A character vector of paths to the images to be combined.

output

The output file path. If NULL, the image is printed.

stack

Logical. TRUE joins images in a top-to-bottom direction. FALSE joins images in a left-to-right direction.

width, height

An integer specifying the common widths and/or heights of the images to be read in. Works only with SVG images. For joining the images side-by-side, setting a common height is recommended, whereas when the images are stacked, setting a common width results in a more desirable output image.

sep_fct

Numeric. sep_fct determines the space between the joined images. The space between the joined images is determined by: $$\textrm{Horizontal space} = \textrm{sep_fct} \times \textrm{max}(\textrm{widths of input images}) $$ $$\textrm{Vertical space} = \textrm{sep_fct} \times \textrm{max}(\textrm{heights of input images}) $$

background

Character. The color to add to background. By default, "transparent".