image_rbind: Stack images below one another

View source: R/img.R

image_rbindR Documentation

Stack images below one another

Description

Stack images below one another

Usage

image_rbind(image, ...)

Arguments

image

either an object of class magick-image or a character vector of files

...

further arguments passed on to image_border in case you want to add a border around the image

Value

an object of class magick-image where all images are put below one another

Examples

library(magick) 
library(data.table)
path     <- system.file(package = "madoc.utils", "extdata", "alto-example.xml")
x        <- read_alto(path)
x$width  <- as.integer(x$WIDTH)
x$height <- as.integer(x$HEIGHT)
x$x_left <- as.integer(x$HPOS)
x$y_top  <- as.integer(x$VPOS)

img      <- system.file(package = "madoc.utils", "extdata", "alto-example.jpg")
img      <- image_read(img)
areas    <- image_crop_textlines(img, x, color = "red")
areas$overview
areas$areas

all      <- image_rbind(areas$areas)
all
all      <- image_rbind(areas$areas, color = "red", geometry = "10x10")
all
all      <- do.call(c, areas$areas)
all      <- image_rbind(all, color = "blue", geometry = "10x10")
all

DIGI-VUB/madoc.utils documentation built on Sept. 14, 2022, 3:03 p.m.