Skip to content

image/png: unexpected behaviour while encoding paletted image with transparency #26395

@prl900

Description

@prl900

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
...

What did you do?

This simple program defines a palette with increasing alpha from 0 to 255 for the blue color. A paletted image using this palette is defined with a horizontal gradient from 0 to 255. This image is then encoded as a png on disk.

https://gist.github.com/prl900/b94fc4d71a25185ff962154e5209c563

What did you expect to see?

blue-white_gradient

What did you see instead?

test_paletted

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions