diff --git a/crates/resvg/src/filter/iir_blur.rs b/crates/resvg/src/filter/iir_blur.rs index e49608b2..5af7009b 100644 --- a/crates/resvg/src/filter/iir_blur.rs +++ b/crates/resvg/src/filter/iir_blur.rs @@ -65,7 +65,7 @@ pub fn apply(sigma_x: f64, sigma_y: f64, src: ImageRefMut) { gaussian_channel(data, &d, 3, buf); } -fn gaussian_channel(data: &mut [u8], d: &BlurData, channel: usize, buf: &mut Vec) { +fn gaussian_channel(data: &mut [u8], d: &BlurData, channel: usize, buf: &mut [f64]) { for i in 0..data.len() / 4 { buf[i] = data[i * 4 + channel] as f64 / 255.0; } @@ -77,7 +77,7 @@ fn gaussian_channel(data: &mut [u8], d: &BlurData, channel: usize, buf: &mut Vec } } -fn gaussianiir2d(d: &BlurData, buf: &mut Vec) { +fn gaussianiir2d(d: &BlurData, buf: &mut [f64]) { // Filter horizontally along each row. let (lambda_x, dnu_x) = if d.sigma_x > 0.0 { let (lambda, dnu) = gen_coefficients(d.sigma_x, d.steps);