-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Colours are not correctly calculated when alpha is low #909
Comments
Fixing this is better sooner than later, but it could be considered a breaking change (as some developers may see their colours get much more faded when this happens... so should it wait until later? discussion in #fyne-contributors |
There may not be an issue here... reading the docs more carefuly I see:
And really if we want to have non-pre-multiplied in our code we should use NRGBA
That would behave like HTML colour code notation... |
Yes, this is not a public API problem - but our code could be tidied up to use NRGBA everywhere except in the Gl based renderer code (as there premul is expected). Everywhere we used image.Image or color.Color we are OK :) |
…e-multiplied. This changed some of the test images, I guess that the alpha channel differences affected their represntation. Also update the image comparison to check the bytes as the RGBA vs NRGBA colour models was breaking things but PNG is always NRGBA, so something strange with the decoder there. Fixes fyne-io#909
…e-multiplied. This changed some of the test images, I guess that the alpha channel differences affected their represntation. Also update the image comparison to check the bytes as the RGBA vs NRGBA colour models was breaking things but PNG is always NRGBA, so something strange with the decoder there. Fixes fyne-io#909
…e-multiplied. This changed some of the test images, I guess that the alpha channel differences affected their represntation. Also update the image comparison to check the bytes as the RGBA vs NRGBA colour models was breaking things but PNG is always NRGBA, so something strange with the decoder there. Fixes #909
On develop for testing. |
It looks like there is a mismatch with pre-mul vs regular alpha handling.
I would propose that we should hide any GL requirement to be pre-multiplied so the API works more like the HTML RGB handling which I think is more common.
Sadly making this change (one way or the other) will likely break some people's app colouring if they have picked bespoke colour values where Alpha < R or G or B.
The text was updated successfully, but these errors were encountered: