You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}
}
}
The text was updated successfully, but these errors were encountered:
The GIF spec at http://www.w3.org/Graphics/GIF/spec-gif89a.txt says that "Each index
must be within the range of the size of the active color table". The ret6.gif image
linked to is not a valid GIF image, according to the spec, even if whatever image
library Chrome uses accepts it.
I'm closing this bug as Working As Intended, unless somebody presents some evidence that
at least two different widely-used GIF decoding implementations agree on what to do with
this out-of-spec image.
by KaneZhangAQ:
The text was updated successfully, but these errors were encountered: