flatten.alpha | R Documentation |
Flatten alpha channel
flatten.alpha(im, bg = "white")
im |
an image (with 4 RGBA colour channels) |
bg |
background: either an RGB image, or a vector of colour values, or a string (e.g. "blue"). Default: white background. |
a blended image
Simon Barthelme
rm.alpha
#Add alpha channel
alpha <- Xc(grayscale(boats))/width(boats)
boats.a <- imlist(boats,alpha) %>% imappend("c")
flatten.alpha(boats.a) %>% plot
flatten.alpha(boats.a,"darkgreen") %>% plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.