8 ms·
iOS Safari seems to render it with no performance issues. Interestingly, it can’t seem to decide whether the background is black or green—it’s different each ti
by Gaelan 5y ago
iOS Safari seems to render it with no performance issues. Interestingly, it can’t seem to decide whether the background is black or green—it’s different each time I load the gif.
- marcan_42 5y agoBrowsers and other players will generally be fine, as they render the image progressively. However, editors /processing tools which attempt to load it as a series of frames or a video will usually break, as memory consumption explodes, unless they have a smart disk buffer system to handle it. I wouldn't be surprised if some poorly implemented players were built on top of abstraction layers that end up flattening the whole thing too and also break, but browsers at least generally do it right.
- slver 5y agoAnd this kids, is why we have key and delta frames. We should drop gif support.
- paulryanrogers 5y agoWhy not cap animated gifs at a maximum duration or file size? GIFs original use cases are already served by formats better suited to the modern era. Their continued popularity seems due mostly to their historical auto play behavior. One that apps are so reluctant to disrupt we're filling landfills with electronic waste to keep up with ever larger and longer meme animations.
- slver 5y agoIt's too late to (re)define GIF. Actually software which edits animated GIFs doesn't have to crash per se, it's all about how smartly it's implemented, and because GIF editing isn't exactly a sprawling industry, most apps tend to be, well, not that smart, and so edge cases can get them.
- paulryanrogers 5y agoFormats don't have to be fully implemented to their original spec for all time. If it's not serving us well today then we can change how our software uses it.
- beckingz 5y agoWouldn't it be better to make a new specification that provides backwards compatibility?
- paulryanrogers 5y agoIf the goal is to stop obscene memory and bandwidth bloat then changing the default to a click-to-play/load would be better. My thinking is too change the incentives so producers aren't exploiting an old format to force autoplay at the expense of wasted resources and user control.
- Wowfunhappy 5y agoThey kind of do, though, or you lose compatibility. There are a lot of corners of the internet which just haven’t been touched in a decade. Are you going to break all of them? For what purpose?
- paulryanrogers 5y agoIs it really much of a loss that very large or long GIF animations required click-to-play?
- oauea 5y agoYes, it would be immense. Many gifs have been used for user interface elements and such a change would break that completely.
- paulryanrogers 5y ago
- niutech 5y agoYou can use <video autoplay loop muted playsinline> for an auto-playing cross-browser animated GIF replacement.
- asddubs 5y agoi'm pretty surprised apng hasn't really displaced gif, at least not completely. a lot of people don't seem to even be aware pngs are animatable these days
- dspillett 5y agoLack of awareness is the main issue by far, but momentum is another. gifs are doing the job and people already have tools they are used to, so there needs to be some compelling reason to switch. For many small animated icons the file-size difference isn't going to be massive and an 8-bit pallet is usually sufficient, and once you start wanting larger animations and full-colour people have already moved to video codecs instead or for non-video-like animations maybe even manipulating SVG. There are no doubt sweet spots where APNG is ideal, or even the only really good option, though I can't think of any that would be common (wanting an animation with an alpha-channel rather than gif's all-or-nothing, maybe). Another matter is compatibility. IE11 is a no-go which even after the recent announcement will kill APNG for some. And while Edge now supports it this has only been the case since the switch to being Chromium based (so the beginning of last year).
- mywittyname 5y agoI think this is because video codecs superseded everything else. An MP4 file is going to be roughly the same size as an apng, while enjoying hardware acceleration on a lot of devices out there. There's still the weird niche of lossless compression where apng or webp would be preferred.
- acdha 5y ago20 years ago the case was stronger but video codecs have both soaked up the performance wins and do not expose new security exposure. Based on APNG and JPEG 2000, the only question I have for new formats is how they plan to get browser support. It’s a hard path to relevance unless you have a good answer for that (even if it’s, say, a WASM fallback).
- asddubs 5y ago
- FalconSensei 5y ago> We should drop gif support. We just need an actual replacement that has the same behaviours and actually works everywhere, as gif does. Videos are not a replacement, and other image formats don't work everywhere
- dragontamer 5y agoH.264 level 4.0 seems to have similar behaviors and works on a very wide variety of platforms in my experience. Chrome, Firefox, Edge, Android, and iOS. That covers most of what we want, right? It fails on say... a 2009 era netbook or Android Gingerbread, but we gotta draw the line somewhere. Even if you do care about Android Gingerbread: H264 3.0 Baseline profile IIRC worked on that (though its been a decade, so maybe I'm getting version numbers mixed up...). Going back to H.264 3.0 Baseline would reduce your compression-efficiency (more distortion / noise at same filesize, or larger filesize for same levels of distortion), but greatly improve your compatibility with decade-old devices if you cared. Even H.264 3.0 Baseline is a far superior format compared to GIF though. ------------- Lol audio is a mess though. But video-only is actually way better than most people expect.
- FalconSensei 5y agoCan I just upload a H.264 level 4.0 video anywhere where an image is allowed and it will be displayed as an image? Will it be displayed as an image in any forum, chat/messenger platform? Can I use it as my avatar in places that allows for gif avatars, like Mastodon? edit: grammar
- dragontamer 5y agoHmm, I'm thinking about the Web-browser level (Chrome / Edge / Firefox) instead of say, web-application layer (ie: PHPbb vs XenForo). The web browsers seems to have significantly improved compatibility of <video> in recent years, and even had decent compatibility 10 years ago (if you use Baseline profile H.264 3.0 videos and Javascript to smooth over some edges).
- deleted 5y ago[deleted]