Skip to main content
Module alpha_blending
atmos
0.1.0
Module alpha_
blending
Module Items
Functions
In atmos::
os_
lib::
webp
atmos
::
os_lib
::
webp
Module
alpha_
blending
Copy item path
Source
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
๐