Function veloren_voxygen::ui::graphic::fraction_shortcircuit_blocks

source ยท
fn fraction_shortcircuit_blocks(image: &RgbaImage) -> Option<f32>
Expand description

Useful to estimates cost of premultiplying alpha in the provided image via the CPU method.

Computes the fraction of 4 pixel chunks that are fully translucent or opaque. Returns None if no premultiplication is needed (i.e. all alpha values are 255).