pub fn blur<T, B: StackBlurrable>(
    buffer: &mut ImgRefMut<'_, T>,
    radius: usize,
    to_blurrable: impl FnMut(&T) -> B,
    to_pixel: impl FnMut(B) -> T
)
Expand description

Blurs a buffer on the X and Y axes.

The provided closures are used to convert from the buffer’s native pixel format to StackBlurrable values that can be consumed by StackBlur.

This is the generic version. If you have a common buffer format (packed 32-bit integers), you can use blur_argb (linear RGB) or blur_srgb (for sRGB).