Skip to main content

halve

Function halve 

Source
pub fn halve(w: u32, h: u32, rgba: &[u8]) -> (u32, u32, Vec<u8>)
Expand description

Level n + 1 from level n’s straight RGBA, w × h × 4 bytes: each 2×2 block averaged in linear light with the alpha premultiplied, the colour taken back to straight alpha. Returns the new size and pixels.