divide pixel values by 256#93
Conversation
andydotxyz
left a comment
There was a problem hiding this comment.
Thanks for this.
Upon looking I see that there is another issue, in that the RGBA in Go is pre-multipled alpha, but the values we need are not - could you perhaps swap in their maths for getting the right values instead?
https://cs.opensource.google/go/go/+/refs/tags/go1.24.2:src/image/color/color.go;l=60
Your solution will work when the Alpha value is strictly higher than all other colour channels, but for a semi-transparent white (for example) it would create an invalid colour.
|
Thanks for the update, but can you address this point regarding the (non-)pre-multiplied alpha?
|
fixes #92