composite_alpha_outline_image: Composite Alpha Outline Image

View source: R/render_alpha_outline.R

composite_alpha_outline_imageR Documentation

Composite Alpha Outline Image

Description

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.

Usage

composite_alpha_outline_image(halo_image, source_image)

Arguments

halo_image

RGBA outline image used as the compositing backdrop.

source_image

RGBA source image, padded to the same dimensions as halo_image, used as the compositing foreground.

Value

A rayimg RGBA image containing the source composited over the outline.


rayimage documentation built on June 12, 2026, 5:06 p.m.