Function downsample

Source
pub fn downsample(
    src: &Image<'_, AlbedoFormat>,
    target_width: u32,
    target_height: u32,
) -> Vec<u8> 
Expand description

Samples the provided image down to the specified width and height. target_width and target_height are expected to be less than or equal to their src counter parts. Will panic if the target dimensions are the same as the source image’s.

For a more fine-tunable version of this function, see downsample_with_custom_scale.