View source: R/render_alpha_outline.R
| composite_alpha_outline_image | R Documentation |
Internal helper that composites the original source image over
the generated outline using source-over alpha compositing. The outline is the
backdrop and the source image is the foreground. Colors are treated as
straight, non-premultiplied alpha, using
Ao = Af + Ab * (1 - Af) and
Co = (Cf * Af + Cb * Ab * (1 - Af)) / Ao. Fully transparent output pixels
are forced to black to avoid carrying arbitrary color values.
composite_alpha_outline_image(halo_image, source_image)
halo_image |
RGBA outline image used as the compositing backdrop. |
source_image |
RGBA source image, padded to the same dimensions as
|
A rayimg RGBA image containing the source composited over the
outline.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.