Skip to contents

Prepare images for paper JS react app

Usage

prep_image(input, height = 256)

Arguments

input

An object of class magick-image or a path to an image in png or jpeg format

height

Height of image sent to react app

Value

a list with an array buffer, the image dimensions and the length of the array buffer

Examples

library(semla)
library(magick)

im <- system.file("extdata/mousebrain", "spatial/tissue_lowres_image.jpg", package = "semla")

# Prep image
im_prepped <- prep_image(im)