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

Incorrect color frequencies when using Median Cut extraction #27

Closed
qTipTip opened this issue Jun 7, 2024 · 0 comments · Fixed by #39
Closed

Incorrect color frequencies when using Median Cut extraction #27

qTipTip opened this issue Jun 7, 2024 · 0 comments · Fixed by #39

Comments

@qTipTip
Copy link
Owner

qTipTip commented Jun 7, 2024

We're expecting all color frequencies in an image to sum to one. However, currently the median cut algorithm does not uphold this invariant.

FAILED tests/integration/test_colorspaces.py::test_palette_invariants_with_image_path[MC-5] - AssertionError: 
FAILED tests/integration/test_colorspaces.py::test_palette_invariants_with_image_path[MC-10] - AssertionError: 
FAILED tests/integration/test_colorspaces.py::test_palette_invariants_with_image_path[MC-100] - AssertionError: 
E           AssertionError: 
E           Items are not equal to 7 significant digits:
E           Expected the sum of all frequencies to be 1.0
E            ACTUAL: 0.12362117134435475
E            DESIRED: 1.0
@qTipTip qTipTip linked a pull request Jul 7, 2024 that will close this issue
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 a pull request may close this issue.

1 participant