Skip to content

Commit

Permalink
Fix box blur radius
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Jun 10, 2024
1 parent 76c96d0 commit 0f3907c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/box_blur.rs
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ pub fn gaussian_box_blur(
channels: FastBlurChannels,
threading_policy: ThreadingPolicy,
) {
let radius = std::cmp::min(radius, 255);
match channels {
FastBlurChannels::Channels3 => {
gaussian_box_blur_impl::<u8, 3>(
Expand Down Expand Up @@ -734,6 +735,7 @@ pub extern "C" fn gaussian_box_blur_u16(
channels: FastBlurChannels,
threading_policy: ThreadingPolicy,
) {
let radius = std::cmp::min(radius, 255);
match channels {
FastBlurChannels::Channels3 => {
gaussian_box_blur_impl::<u16, 3>(
Expand Down

0 comments on commit 0f3907c

Please sign in to comment.