pub fn downsample_average_f32(
src: &[f32],
src_width: usize,
src_height: usize,
dst: &mut [f32],
dst_width: usize,
dst_height: usize,
) -> Result<()>Expand description
Downsample using area averaging (for antialiasing)
When downsampling, this method averages pixels in the source region to produce smoother results with less aliasing.
§Arguments
src- Source image data (row-major)src_width- Source image widthsrc_height- Source image heightdst- Destination buffer (must be dst_width * dst_height)dst_width- Destination widthdst_height- Destination height
§Errors
Returns an error if buffer sizes don’t match dimensions or upsampling is attempted