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

Potential subtle off-by-one in load_image #5

Closed
nullus opened this issue Aug 10, 2023 · 1 comment
Closed

Potential subtle off-by-one in load_image #5

nullus opened this issue Aug 10, 2023 · 1 comment

Comments

@nullus
Copy link
Contributor

nullus commented Aug 10, 2023

In load_image, assuming the input data domain is [0, 65535] (i.e. 16-bit integer) then the converted output range is [0, 1) because it's being divided by 65536.

Though it would never be visible, it appeared incorrect to me. I created #4 while experimenting with some other changes

@fthaler
Copy link
Owner

fthaler commented Aug 11, 2023

Good catch and thanks for your contribution! I merged #4.

@fthaler fthaler closed this as completed Aug 11, 2023
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

No branches or pull requests

2 participants