(Replying to PARENT post)

More of a historic curiosity these days, the legal reasons to avoid GIFs 20 years ago don't exist anymore, the LZW patents have expired.

That being said, PNG always had much stronger compression, in addition to supporting 24- and 32-bit color. Nowadays, we even have WebP that usually compresses better than PNG, and compresses far, far better than animated GIF. Animated GIF is a pretty ugly hack to the format, very inefficient for many common kinds of animations (or full-blown video as it's often used now); I've found that animated WebP can produce files around 10% the size of GIFs.

๐Ÿ‘คchungy๐Ÿ•‘6y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

LZW is a lovely algorithm. It's simple enough to explain in a page of pseudocode and fast enough to run on 1980s hardware easily. The compression rate is "good enough." If not for the patent issue, there'd be no reason to switch to the marginally better Deflate (which was only created in response to the patent). A shame Unisys got greedy and killed it before its time.

Though that's got nothing to do with why GIFs got so popular. That's purely because GIF is the only format that could display animations on every browser since 1995. The timing of PNG was rather unfortunate - the PNG team had decided on not supporting animation because GIF animation was rare and adding it to the spec would've unnecessarily complicated things. They froze the spec, planning to submit it to W3C and IETF for standardization - and then Netscape, in full "move fast and break things" mode, released Navigator 2 with animated GIF support. So soon every GeoCities page is full of annoying sparkly GIFs, PNG only lets you make boring stills, and we've got to support both formats forever.

๐Ÿ‘คbbanyc๐Ÿ•‘6y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

WebP is lossy though, no? The whole point of PNG is preserving the exact pixel data.
๐Ÿ‘คgrenoire๐Ÿ•‘6y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Was the original focus on size or performance for animated GIFs? The more you compress something, generally the more processing is required to restore it. I started using the web in the mid 90s, and animated GIFs were everywhere.
๐Ÿ‘คmysterydip๐Ÿ•‘6y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

But not supported by iOS Safari. And APNG not supported by edge. That's why sites like imgur use mp4 videos as an alternative to GIFs.

It's not that a bad deal though, one minute of video is roughly 7Mo for something close to DVD quality. I had GIFS lasting a few seconds weighting way more, with terrible quality.

๐Ÿ‘คBiteCode_dev๐Ÿ•‘6y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Yeah, it's a time capsule, sure, but a wonderful one. Just this part alone had me rolling: "Actually, they're going to draw on them with red markers -- setting fires in public places is against the law in California."

I'm not that well-versed in the matter, is WebP already supported widely? I mean, not just on desktop and advanced smartphones?

๐Ÿ‘คWilTimSon๐Ÿ•‘6y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

>I've found that animated WebP can produce files around 10% the size of GIFs.

For nicely optimized GIFs like these https://iwdrm.tumblr.com/ then WebP really struggles. Try to convert some of them to WebP and you'll see the result is often bigger than the original GIF.

๐Ÿ‘คmaxst๐Ÿ•‘6y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

If you have aliased pixels, gifs can compress much better than video formats. It's really a shame when sites like twitter mangle those files into worse-looking and larger video files.

And as a side note: png does not strictly compress better; sometimes the ability to use palette indexes that are smaller than 8 bits is an advantage.

๐Ÿ‘คDylan16807๐Ÿ•‘6y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Is webP as free as PNG? I remember that its not taking over the world had a licensing component in it.
๐Ÿ‘คnine_k๐Ÿ•‘6y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

The article is much more about software patents than one case of their abuse, so it's still very much relevant today.
๐Ÿ‘คSymbiote๐Ÿ•‘6y๐Ÿ”ผ0๐Ÿ—จ๏ธ0