% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render_stack.R
\name{render_stack}
\alias{render_stack}
\title{Stack Images}
\usage{
render_stack(
  input_list,
  stack = c("v", "h", "vertical", "horizontal"),
  align = c("center", "start", "end", "left", "right", "top", "bottom"),
  background = c(0, 0, 0, 0),
  convert_colorspace = TRUE,
  filename = NULL,
  preview = FALSE
)
}
\arguments{
\item{input_list}{List of 3-layer RGB/4-layer RGBA array, \code{rayimg} class, or image filenames.}

\item{stack}{Default \code{"v"}. Stack direction: \code{"v"}/\code{"vertical"} or \code{"h"}/\code{"horizontal"}.}

\item{align}{Default \code{"center"}. Alignment on the non-stacking axis. Options:
\code{"start"}/\code{"left"}/\code{"top"}, \code{"center"}, \code{"end"}/\code{"right"}/\code{"bottom"}.}

\item{background}{Default \code{c(0,0,0,0)}. Background color for padding, as numeric
\code{c(r,g,b[,a])} in 0..1 or a color string.}

\item{convert_colorspace}{Default \code{TRUE}. Whether to convert all images to match
the colorspace of the first image in the list.}

\item{filename}{Default \code{NULL}. File to save the image to. If \code{NULL} and \code{preview = FALSE},
returns an RGB array.}

\item{preview}{Default \code{FALSE}. If \code{TRUE}, it will display the image in addition
to returning it.}
}
\value{
A \code{rayimg} RGBA array.
}
\description{
Stacks a list of images vertically or horizontally into a single image.
}
\examples{
\dontshow{if (interactive() || identical(Sys.getenv("IN_PKGDOWN"), "true")) withAutoprint(\{ # examplesIf}
render_stack(list(dragon, 1 - dragon), stack = "h") |>
 plot_image()
render_stack(list(dragon, render_bw(dragon)), stack = "v") |>
 plot_image()
\dontshow{\}) # examplesIf}
}
