Skip to main content

downsample_2x

Function downsample_2x 

Source
pub fn downsample_2x(
    input: &str,
    output: &str,
    width: u32,
    height: u32,
) -> Program
Expand description

Build a Program that 2× downsamples input into output.

  • input: [u32; width * height] - source pixels (packed RGBA)
  • output: [u32; (width/2) * (height/2)] - downsampled result
  • Width and height must be even.