Skip to main content

box_downscale

Function box_downscale 

Source
pub fn box_downscale(
    src: &[u8],
    sw: usize,
    sh: usize,
    dw: usize,
    dh: usize,
) -> Vec<u8> 
Expand description

Area-average downscale of an RGB888 buffer.

Averaging every source pixel that lands in a destination cell preserves thin strokes as continuous grey rather than flickering fragments.