Skip to content

image/gif: "invalid pixel value" on image that works in Chrome #8789

@gopherbot

Description

@gopherbot

by KaneZhangAQ:

Source photo url: http://needkane.qiniudn.com/ret6.gif
But go can't get the gif info .

gifConf, err1 := gif.DecodeAll(imgSource)//if imagesource is the gif
        
        println(err1.Error())//result is gif: invalid pixel value

According to the go source code,I find

if len(m.Palette) < 256 {//get 128
            for _, pixel := range m.Pix {
//pixel is 128 too,but my gif is ok,you can see it from the url
                if int(pixel) >= len(m.Palette) {
                        return errBadPixel
                }
            }
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions