3 ms·
Any gif that claims to be showing 60fps is simply untrue due to the fact that no web browser out there right now supports displaying gifs higher than 50fps. On
by onion2k 4y ago
Any gif that claims to be showing 60fps is simply untrue due to the fact that no web browser out there right now supports displaying gifs higher than 50fps.
Only if you limit yourself to displaying the gif in an <img /> tag. You can parse the frames yourself and render them with a <canvas> at a faster rate using browser's requestAnimationFrame (which sync's to the refresh rate of your display.)
- creativenolo 4y agoIf you own the presentation platform of the gif, would it not be better to use different format? The only advantage of gif I know of is that the creator of the asset has some control of the playback on the presentation platform. Other than this, it is a technically sub-optimal format. But no other formats support the creator control aspect.
- onion2k 4y agoIf you own the presentation platform of the gif, would it not be better to use different format? You might want to display media supplied by users.
- blululu 4y agoJust convert .gif to .webm or .mp4 and render the media as a video element. You will save yourself a lot of trouble by replacing gifs with videos.
- saba2008 4y agoGIF compression is lossless, codecs used in WebM and MP4 are not.
- gmueckl 4y agoGIF is lossess iff the input has at most 256 different colors. That is the maximum color palette size and not sufficient for most cases.
- onion2k 4y agoThat's not strictly true. GIF can have a maximum of 256 colors per block, but different blocks can have different palettes, and each frame is not required to fill every block, so you can build up images with more than 256 colors using a series of incomplete frames. https://en.wikipedia.org/wiki/GIF#True_color https://en.wikipedia.org/wiki/GIF#True_color
- kllrnohj 4y agowebm & mp4 can deliver vastly higher resolutions at a fraction of the size of GIFs, though. So while a GIF is "lossless", that doesn't help when size dictates that the quality is still crap anyway.
- creativenolo 4y agoIt's more subtle than that. Convert a video of black video to mp4 and gif, both will be lossless. Whilst some gifs are not compressed it appears to be niche for them to not have been. Or for the creator of the gif to have not constrained themselves during the creation process. Perhaps important for NFT creators. Whilst not overly concerning themselves with the resources involved, they shouldn't be troubled by file size either.
- madeofpalk 4y agoAlmost every platform these days convert uploaded gifs to mp4 to display anyway.
- manholio 4y agoI think the point is that 60 fps is not a representable value in the gif binary format, just like (int pi) can be either 3 or perhaps 4, but never a transcendental number. You can have a magical decoder that circumvents this, but that's no longer a gif.
- IshKebab 4y agoThe only reason to use GIF in the first place is if you have to put it in an <img>.