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

Why RGB values on transparent pixels is (71,112,76) #362

Closed
shanegxxiao opened this issue Aug 20, 2020 · 3 comments
Closed

Why RGB values on transparent pixels is (71,112,76) #362

shanegxxiao opened this issue Aug 20, 2020 · 3 comments

Comments

@shanegxxiao
Copy link

shanegxxiao commented Aug 20, 2020

After compare several pairs images processed by pngquant, it seems pixel with rgba = (0, 0, 0, 0) was modified to (71, 112, 76, 0), How is it happen? It makes premultiply alpha works failed.

@kornelski
Copy link
Owner

No, it's not a failure. When alpha=0 these values have no meaning. They're visible only in software that incorrectly drops the alpha channel, and in that case they're useful for diagnosing the error.

@shanegxxiao
Copy link
Author

Thanks first, and sorry for the late reply. Is it possiable to keep the original RGB values event alpha is zero in the images processed by pngquant?

@kornelski
Copy link
Owner

kornelski commented Aug 22, 2020

I've intentionally made it completely impossible. Indexed 8 bit color can't afford it, so RGB of transparent colors is the first thing pngquant completely clears.

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