Stacks a list of images vertically or horizontally into a single image.
List of 3-layer RGB/4-layer RGBA array, rayimg class, or image filenames.
Default "v". Stack direction: "v"/"vertical" or "h"/"horizontal".
Default "center". Alignment on the non-stacking axis. Options:
"start"/"left"/"top", "center", "end"/"right"/"bottom".
Default c(0,0,0,0). Background color for padding, as numeric
c(r,g,b[,a]) in 0..1 or a color string.
Default TRUE. Whether to convert all images to match
the colorspace of the first image in the list.
Default NULL. File to save the image to. If NULL and preview = FALSE,
returns an RGB array.
Default FALSE. If TRUE, it will display the image in addition
to returning it.
A rayimg RGBA array.
if(run_documentation()){
render_stack(list(dragon, 1 - dragon), stack = "h") |>
plot_image()
}
if(run_documentation()){
render_stack(list(dragon, render_bw(dragon)), stack = "v") |>
plot_image()
}