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

image: decode a png file return unknown format #49999

Closed
hmvhamide opened this issue Dec 6, 2021 · 1 comment
Closed

image: decode a png file return unknown format #49999

hmvhamide opened this issue Dec 6, 2021 · 1 comment

Comments

@hmvhamide
Copy link

hmvhamide commented Dec 6, 2021

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

$ go version
go version go1.17 linux/amd64


Does this issue reproduce with the latest release?

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

go env Output
$ go env

What did you do?

I open a png image file and decode it in the following code, it returns unknown format.
The image
orig
is attached.
Code: https://go.dev/play/p/op3ILPNJmCw

What did you expect to see?

I expect the code to finish without error. Because this is a valid png file and can be opened with image editors like GIMP.

What did you see instead?

The following error printed:
error decoding image image: unknown format

@mdlayher
Copy link
Member

mdlayher commented Dec 6, 2021

Please see the package docs and example. https://pkg.go.dev/image

@mdlayher mdlayher closed this as completed Dec 6, 2021
@golang golang locked and limited conversation to collaborators Dec 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants