The Mystery of the Spotty Animated GIF
smerity.com
smerity.com
For historical reasons most browsers don't respect a frame delay of 0 (computers used to be slow enough that even a 0 delay was good enough for animation; as they got faster browsers added extra delays to make old animations work correctly), but I think some renderers will correctly treat it as one frame (at least http://slbkbs.org/jsgif/ does! It has other problems with tricky GIFs, though -- the disposal method code is broken, for one).
Of course, you should just use PNG.
But it's also easy to hack! I've developed lossy GIF compressor: http://pornel.net/lossygif
it's still worse than PNG, but would be awesome for animations. Anyone wants to help? https://github.com/pornel/giflossy/
LZW was probably chosen over Deflate for simplicity reasons. Maybe webP's complexity has been hurting its adoption?
How does giflossy work? I don't see an explanation on that page.
GIF lives because it's expected to work everywhere. WebP so far isn't even a first-class citizen in Google's world :(
And the thing it's famous for, the "Netscape looping extension" (NAB) ... that's from 1995 (Netscape Navigator 2.0b4). Yes, there was a time when IE would only play a GIF once and Netscape would loop it.
screen-record using a free lossless codec eg http://lags.leetcode.net/codec.html
i used Virtualdub which can produce and AVI, but also an animated GIF. then compress the result using http://www.lcdf.org/gifsicle/
result is extremely tiny filesizes for animations that can be embedded in any web page. hopefully this saves someone a lot of sleuthing work.
WebP should win over GIF. It's smaller, can be either lossy or lossless, supports full transparency, has animation, ... except for the fact that almost all GIF usage is (a) "clipart", (b) forums/comments/emails or (c) raw links (i.e. Imgur).
When I say clipart, I meant that most GIF image use would be people using GIFs made by other people. The Internet has a large treasure trove of GIFs that people will re-use from here to eternity. I doubt anyone will ever bother to convert the GIF to WebP.
Even if they did, if your browser doesn't natively support WebP[1] then you need a Javascript shim. Most people won't know what a shim is or won't be allowed to arbitrarily inject JS into the forum/comment/email. With raw image links, it's obviously not possibly to add a JS shim either.
I hate to say, but I think we're going to be stuck with GIF for a while longer...
And GIF's reprieve got extended thanks to Tumblr images of Tom Hiddleston mouthing words, of all things.
APNG's degraded support is possibly even worse for adoption. It has all the same issues as WebP (see the shim discussion above) bundled with the fact that people don't expect PNGs to move.
People either (a) don't know it's broken (i.e. think the single frame means it's a static image) or (b) know it's broken and chide you for using PNG instead of GIF.
----
When the GIF software decides to take a snapshot of the animation instead of playing it, it grabs an individual frame from somewhere past the start (i.e. movie trailers always start with a "boring" black frame).
This would generally be fine except that, as we've seen, GIFs use partial frames to aid in compression. What we end up with is a partial frame that appears "spotty" as it only contains the difference between the past frame and the current one.
If the GIF software can navigate multiple frames, then it must know how to render them. Its only lazy programs that would export these incomplete frames by just copying the bitstream. A properly written program would export a full frame, made from the composites of the previous parts of the animation.
The programs that are viewing these single frame exports are rendering them just fine, they were simply supplied with poor data.
- NCSS Student :D