Skip to contents

What it says it does.

Usage

array_to_cimg(x, flatten_alpha = TRUE, bg = "white", rm_alpha = TRUE)

Arguments

x

An image array, i.e. as read in by readPNG.

flatten_alpha

Logical. Flatten the alpha channel?

bg

Passed to imager::flatten.alpha(). Pixel color for previously transparent pixels.

rm_alpha

Logical. Remove the alpha channel? Note this will "reveal" whatever is hidden behind the transparent pixels, rather than turn them white.

Value

A cimg object.