Skip to content

image/png: invalid format: palette index out of range #4319

@gopherbot

Description

@gopherbot

by darkgray:

What steps will reproduce the problem?
1. Import image/png
2. Attempt to use image.Decode() on certain PNG files
3. Observe error message
Code example (and image) - http://play.golang.org/p/cfi12UMcMR

What is the expected output?
(0,0)-(822,469)

What do you see instead?
2012/10/31 01:59:54 png: invalid format: palette index out of range
exit status 1

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Windows 7

Which version are you using?  (run 'go version')
1.0.3

Please provide any additional information below.
The image attached is an example of error-inducing data. It opens fine in software like
Firefox, Chrome and IrfanView, so it would be nice to make it usable in Go as well.

Attachments:

  1. packetloss.png (11202 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions