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

Wrong dominant color for transparent images (Python) #14

Open
mickeyl opened this issue Mar 30, 2016 · 1 comment
Open

Wrong dominant color for transparent images (Python) #14

mickeyl opened this issue Mar 30, 2016 · 1 comment

Comments

@mickeyl
Copy link

mickeyl commented Mar 30, 2016

Hi,

for the image https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/NDR_Info_Logo.svg/1280px-NDR_Info_Logo.svg.png I get the following (wrong) output:

[0, 0, 0] [0, 50, 101] [255, 194, 0] [121, 92, 0]

Obviously there are no black pixels whatsoever in this image – it looks like the fully transparent pixels are getting count. How does your program deal with alpha values? Can we teach it to ignore them or – perhaps better – take the alpha value into account for the pixel representation?

@mickeyl mickeyl changed the title Wrong dominant color for transparent images Wrong dominant color for transparent images (Python) Mar 30, 2016
@pixelogik
Copy link
Owner

Good point. An option to use the alpha channel as a weight in the calculation would be handy.

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