trevorld / bittermelon

Bitmap Tools
https://trevorldavis.com/R/bittermelon/dev
Other
6 stars 0 forks source link

`as_bm_pixmap.rgba()` / `as_bm_pixmap.bitmap()` / `as_bm_pixmap.rawimg()` #83

Closed trevorld closed 3 weeks ago

trevorld commented 3 weeks ago
as_bm_pixmap.rgba <- function(x, ...) {
  array <- aperm(structure(as.numeric(x) / 255, dim = dim(x)))
  as_bm_pixmap.array(array)
}