5 ms·
An interesting quick dive into how some of the artifacts of historical implementations can carry forward decades later. I'm saving this one. While everyone on H
by xoa 5y ago
An interesting quick dive into how some of the artifacts of historical implementations can carry forward decades later. I'm saving this one. While everyone on HN is probably familiar with a pile of examples of this in our own work particularly if you do anything lower level, this is a nice example because it's really easy to grasp even for total non-programmers and gives a feel for the layers upon layers the digital world is built on. Details on the x86-64 bootstrap sequence are interesting to tech people but this is the sort of thing I might show in a school class.
That said at first I thought the author was being a bit tongue in cheek on the suggestion to fix it with:
>A downside to making any changes is that the badly formatted GIFs won't render any more. I reckon just be bold, like the release of Netscape 2.0...If Netscape was fine with breaking poorly-made GIFs, we should be too!
But we kind of have a bit more content now then when Netscape 2 was released, and it seems they're serious?
Support more than 256 colours in a single frame of GIF animation
Support fast GIFs (10ms delay)
No confusing behaviour with small delay = slow GIF
Better compression for GIFs with multiple small areas updated per frame
But frankly at this point why? We've got good universally adapted image formats that do more than 256 colors. We've got webm and so on (even Apple caved on that one in the end) for baked animation which is much smaller and more powerful than gif, and plenty of CPU and libraries for generation on the fly. We've got powerful ways to do animation purely with HTML/CSS/SVG/JS. GIF is a historical artifact with a lot of its value at this point purely about old things. This wouldn't even retroactively bring newer capabilities to older systems because it would require updated code which by definition means the ability to run new browsers and thus modern capabilities.
I get they really enjoy hacking on gif but come on. Only way I can see it working is if all the players agreed on some metadata that could be added to gifs which wanted 'standards' vs 'historical' playback with the default remaining historical, and potentially also make it a browser setting. That'd still leave the ad issue, but maybe at this point that's moot given the advancements in blockers (and it'd be a very easy thing to look for as an indication of an ad, and thus be selected against).
- layer8 5y ago> We've got webm and so on The spiritual successor to animated GIFs — by that I mean nonlossy pixel-perfect animations — would be APNG, which is supported by virtually all current modern browsers: https://caniuse.com/apng https://caniuse.com/apng
- hutzlibu 5y ago"nonlossy pixel-perfect animations " That sounds way less awesome, when you consider it only had 256 colors, so allmost all content did indeed loose a lot, by converting to gif. And this is actually the first time I have heard of apng and interesting that it is even now widely avaiable. But I do not really see a broad use case, compared to webm. Because file size matters usually much more, than pixel perfect animation. I wanted to convert a short screencast to a gif, result: hundreds of megabyte big monster, with crappy quality. The same with webm: 2 MB and good enough quality.
- layer8 5y agoThe use-case isn’t video, it’s small icon-style color animations or animated pixel art (like the example in the article). It’s the same difference as between JPEG and PNG.
- hutzlibu 5y agoWell, yes - and for this use case I consider apng. But my point was, that the main use case of gif, were short videos and animations, people shared. And for this, I am glad that webm seems now broadly avaiable for that role.
- layer8 5y agoWell… that use case only started after the use of animated GIFs for small pixel-art animations already existed for many years. I always considered the video use, after it started, as a misuse/aberration. I certainly agree that webm is the right tool for the video use case. But I care about the original use cases of animated GIFs. If you want to get past the limitations of the format for those use cases, APNG should be the answer.
- hutzlibu 5y ago"If you want to get past the limitations of the format for those use cases, APNG should be the answer" Sure, we agree on that.
- gfody 5y agowe have better formats but gifs are still everywhere, maybe there should be a gif222 to fix this stuff and maybe improve compression a bit too
- NoahKAndrews 5y agoThat's kind of the point. What makes you think that people still using suboptimal GIFs are going to want to go update those GIFs to comply with breaking changes in how the spec is interpreted?
- gfody 5y agopeople won't change but if the gif library were updated then maybe browsers could support a modern rev with unambiguously defined behavior and compression improvements, maintain compatibility for older gif87a and gif89a files, and then a path would exist for gif authoring tools to eventually output gif222 by default at some point in the future (instead of throwing our hands up and letting this crusty old tech define our internet forever)
- rsch 5y agoIf only. GIF is still the only format that supports animated frames, and is supported in most applications that support images. I sometimes create some animated WEBP to post somewhere, but the outcome is always the same, I have to go back and convert it to GIF or it won’t display.
- kevin_thibedeau 5y agohttps://en.wikipedia.org/wiki/APNG https://en.wikipedia.org/wiki/APNG