You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I simply created an NRGBA image with a single pixel (with a small value color (1 in uint8) and an alpha less than 0.5 (127 in uint8)), and tried to copy it using it as source of draw.Draw():
Even though this is a non-alpha-premultiplied image, it looks like a possible precision loss due to the value of the alpha channel: if I use an alpha higher or equal than 0.5 (128 in uint8) the test passes.
The text was updated successfully, but these errors were encountered:
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Apr 5, 2022
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I simply created an NRGBA image with a single pixel (with a small value color (1 in
uint8
) and an alpha less than 0.5 (127 inuint8
)), and tried to copy it using it as source ofdraw.Draw()
:Go playground link: https://go.dev/play/p/IYelc0epkM7
What did you expect to see?
I expected the test to pass because this test passes using
go-1.17.8
(Go playground link: https://go.dev/play/p/IYelc0epkM7?v=goprev).What did you see instead?
Instead I saw a difference between the original image (expected) and the actual one (drawn using
draw.Draw()
):Even though this is a
non-alpha-premultiplied
image, it looks like a possible precision loss due to the value of thealpha
channel: if I use an alpha higher or equal than 0.5 (128 inuint8
) the test passes.The text was updated successfully, but these errors were encountered: