Skip to content
New issue

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

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

Already on GitHub? # to your account

Fixed addition of fuzz for color chooser to avoid overflows #21

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

sandalwoodbox
Copy link
Contributor

It turns out that if you select a color close to the boundary values, you can end up getting an overflow:

RuntimeWarning: overflow encountered in scalar add

This seems to leave things in a bit of a weird state, and I wasn't able to recover from it. It turns out the fix is to use cv2 helpers that automatically clip the values at the max / min. TBH I'm not sure how I haven't run into this before... but this should fix it.

@sandalwoodbox
Copy link
Contributor Author

Switched which GitHub Action is getting used to run unit tests due to federicocarboni/setup-ffmpeg#21

@BeatriceEagle BeatriceEagle merged commit c1eec4a into BeatriceEagle:main Jan 12, 2025
15 of 24 checks passed
@sandalwoodbox sandalwoodbox deleted the fix-colorchooser-fuzz branch January 12, 2025 05:30
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants