-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
There are images which browsers can render but which image/gif chokes on.
The following runs successfully for most gifs:
import (
"fmt"
"image/gif"
"os"
)
const example = "sample.gif"
func main() {
fmt.Println("attempting to read gif")
file, err := os.Open(example)
if err != nil {
fmt.Println("Can't open this file:", err)
return
}
img, err := gif.Decode(file)
if err != nil {
fmt.Println("Can't decode this as a gif:", err)
return
}
_ = img.Bounds()
fmt.Println("gif decoded")
}
But when trying to run it on a particular gif (below), this happens:
$ go run main.go
attempting to read gif
Can't decode this as a gif: gif: not enough image data
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
