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

Changed RGB from 250 to 255 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

UnKn0wn27
Copy link

This is an awesome project! Works the way it is intended. The only thing I don't understand is why ignore white color RBG that is higher than 250? I would understand if it was just mono-color images but it is only focused on images that are white and gives me an error. Could you please explain?

Here are a few of the images that gave me the errors.

https://user-images.githubusercontent.com/29236212/35098291-40acd384-fc5c-11e7-9407-e0595f7a2df8.png

https://user-images.githubusercontent.com/29236212/35098299-4536df1c-fc5c-11e7-9878-3f2c30c7f9d9.png

@Krzysiu
Copy link

Krzysiu commented Mar 24, 2022

JPEG compression gets crazy with extreme values. While this is barely noticeable by eyes/our perception, it's a pain when I'm doing tools that depends on color statistics. Often the most reliable and fastest way is to ignore these values. This library could provide some optional parameter to override it, but for most cases 250 is much better than 255.

The other reason I can think of is that photo with overexposed parts would give wrong main color - because overexposed blue and red would turn into white and white. While our perception will be able to rebuild missing color information, computer algorithms can't do much. Alas, this point is probably not the reason, as in this case we should ignore also very low values.

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.

2 participants