Skip to main content

composite

Function composite 

Source
fn composite(channel: u8, alpha: u8) -> u8
Expand description

Composite a single 8-bit colour channel onto opaque white using its 8-bit alpha. ((c * a) + 255 * (255 - a)) / 255, rounded to nearest.