Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not round floats in interpolate #2052

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

JulianKnodt
Copy link
Contributor

@JulianKnodt JulianKnodt commented Nov 9, 2023

I filed this issue in num_traits to control rounding behavior when converting:
rust-num/num-traits#296

I don't expect it to be fixed for a while if at all. This is a super hacky (but generic) way to ensure that floats aren't rounded in interpolate.

How do other methods handle this? I see a FIXME in gaussian blur so I suspect other methods currently also miss this. I can also update them, but I would have to litter the same hack in other places.

Closes #2045

cc @alucas2

@JulianKnodt JulianKnodt force-pushed the fix_overflow branch 2 times, most recently from 991b276 to 09334a2 Compare November 10, 2023 09:30
@fintelia fintelia merged commit 032c3e2 into image-rs:master Nov 14, 2023
@JulianKnodt JulianKnodt deleted the fix_overflow branch November 14, 2023 20:24
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.

Sample/interpolate gives rounded values, which is unexpected when dealing with f32 images
2 participants