Skip to main content

downscale_x

Function downscale_x 

Source
fn downscale_x(
    src: &mut Pixmap,
    src_width: u16,
    src_height: u16,
    dst_width: u16,
    edge_mode: EdgeMode,
)
Expand description

Horizontal decimation pass using [1,3,3,1]/8 filter.

Reduces width by 2x while applying a binomial blur kernel. The [1,3,3,1] weights approximate a Gaussian and contribute variance=0.75 before the 2x downsampling.