The attached GIF is rendered successfully by both Chrome and Firefox. It probably has
some sort of corruption though, because Safari and Preview render it as corrupt (though
it still does render). GraphicConverter also renders it as corrupt, though in a
However, Go doesn't render it at all. It just returns the error "lzw: invalid
Mac OS X 10.7.3, go version go1.
I looked into this a bit. I found that when the invalid code is found:
Because 639 < 90 (d.hi), it fails. I'll trace through another gif decoder and try to
see what they do when receiving a code like this.
A fix for this would involve making compress/lzw tolerant of incorrectly encoded
streams. This seems like a bad idea in general. So a correct fix would need to add to
the API of compress/lzw a boolean for "tolerate errors?".
An API change to compress/lzw before Go 1.1 is not going to happen, so I think punting
on this is the right call.
The image in comment #7 is something else (issue #5050).