What it says it does.
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.