Skip to content

Fix unsharpen API and f32 behavior#2887

Open
RunDevelopment wants to merge 1 commit intoimage-rs:mainfrom
RunDevelopment:threshold-fix
Open

Fix unsharpen API and f32 behavior#2887
RunDevelopment wants to merge 1 commit intoimage-rs:mainfrom
RunDevelopment:threshold-fix

Conversation

@RunDevelopment
Copy link
Copy Markdown
Member

@RunDevelopment RunDevelopment commented Mar 22, 2026

Partial fix for #2850. Basically the same as #2886, but for unsharpen.

Changes:

  • unsharpen now takes a f32 parameter between -1 and 1 for the threshold value.
  • The implementation of these functions is now f32 based.

This makes the API consistent across subpixel types and fixes the behavior for f32/f64 images. I also fixed signed integer types in the process.

Downsides are similar as in #2886. It's slower for u8+u16 and there is precision loss due to f32, No rounding issues this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant