Module alpha_blending

Source
Expand description

Functionsยง

blend_channel_nonpremult ๐Ÿ”’
Blend a single channel of src over dst, given their alpha channel values. src and dst are assumed to be NOT pre-multiplied by alpha.
blend_pixel_nonpremult ๐Ÿ”’
Blend src over dst assuming they are NOT pre-multiplied by alpha.
channel_shift ๐Ÿ”’
div_by_255 ๐Ÿ”’
Divides by 255, rounding to nearest (as opposed to down, like regular integer division does). TODO: cannot output 256, so the output is effecitively u8. Plumb that through the code.
do_alpha_blending ๐Ÿ”’