array_to_RasterStack {recolorize} | R Documentation |
Convert from an array to a raster stack
Description
Convert from an image array to a raster stack, optionally using the alpha channel as a mask.
Usage
array_to_RasterStack(
img_array,
type = "stack",
alpha_mask = TRUE,
return_alpha = FALSE
)
Arguments
img_array |
An RGB array. |
type |
Type of Raster* object to return. One of either "stack" (raster::stack) or "brick" (raster::brick). |
alpha_mask |
Logical. Use the alpha channel as a background mask? |
return_alpha |
Logical. Return the alpha channel as a layer? |
Value
A Raster* object, either RasterStack
or RasterBrick
depending
on the type
argument.
[Package recolorize version 0.1.0 Index]