Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
image/gif: decoding of some GIFs fails with error `gif: invalid pixel value` yet they open alright. #15059
Please answer these questions before submitting your issue. Thanks!
It is indeed an invalid GIF image: the frame's palette only has 128 entries (i.e. valid values are from 0 to 127 inclusive), but the 'transparent index' is given as 128, which is outside the range [0, 127]. The GIF spec at https://www.w3.org/Graphics/GIF/spec-gif89a.txt says in section 22, Table Based Image Data, "Each index must be within the range of the size of the active color table".
Imagemagick similarly complains:
$ convert joker1.gif x.png
Nonetheless, it treats it as a warning, not an error. Furthemore, joker1.gif is viewable (with no visible error message) in both Firefox and Google Chrome, and by Eye-of-Gnome (which uses gdk-pixbuf). I suppose that it's a case of reality trumping the standard, and we should 'fix' this for Go.