Add alpha channel to image array
Examples
x <- matrix(rnorm(4), nrow = 2)
add_img_array_alpha(x, alpha = 0.1)
#> , , 1
#>
#> [,1] [,2]
#> [1,] -0.8289657 -0.8621887
#> [2,] -0.8413987 0.6702333
#>
#> , , 2
#>
#> [,1] [,2]
#> [1,] -0.8289657 -0.8621887
#> [2,] -0.8413987 0.6702333
#>
#> , , 3
#>
#> [,1] [,2]
#> [1,] -0.8289657 -0.8621887
#> [2,] -0.8413987 0.6702333
#>
#> , , 4
#>
#> [,1] [,2]
#> [1,] 0.1 0.1
#> [2,] 0.1 0.1
#>