Skip to main content

downscale

Function downscale 

Source
pub(crate) fn downscale(
    src: &mut Pixmap,
    src_width: u16,
    src_height: u16,
    edge_mode: EdgeMode,
) -> (u16, u16)
Expand description

Downsample image by 2x using separable [1,3,3,1]/8 binomial filter.

Performs horizontal and vertical decimation in sequence. Returns the new logical dimensions (ceil(width/2), ceil(height/2)).