Already more than a decade old and with roots reaching back half a decade before the World Wide Web itself, the GIF was showing its age. It offered support for a paltry 256 colors. Its animation capabilities were easily rivaled by a flipbook. It was markedly inferior to virtually every file format that had followed it. On top of that, there were the threats of litigation from parent companies and patent-holders which had been looming over GIF users for five long years before the fiery call to action. By Burn All GIFs Day, the GIF was wobbling on the precipice of destruction. Those who knew enough to care deeply about file formats and the future of the web were marching on the gates, armed with PNGs of torches and pitchforks.
And yet, somehow, here we are. Seventeen years later, the GIF not only isn’t dead. It rules the web.
Sometimes, things just work – even if it sucks.
The GIFs were so annoying I gave up trying to read the article!
This pretty much sums up my experience with GIFs. Funny thing that these days when you upload a GIF to certain places its converted into a mp4 video and embedded via a video-tag (that can be paused).
panzi,
The article only used these “fake gifs”. They didn’t work for me, I don’t know why.
I was never a fan of animated gifs, but the author really missed the opportunity to use authentic animated gifs here. Because if they belong anywhere, it’s in an article about animated gifs and there isn’t a single one.
The one above the article is a true GIF:
1467821488-gif-shark-dolphin.gif (838 KB)
Apart from that, you seem to be right.
For my purposes, GIFs had one killer feature, and it wasn’t animation…it was transparent pixels.
With other formats, if you wanted a non-rectangular logo, the logo image itself would be forced to include the background inside the image. GIFs made it possible for the logos to be independent from the backgrounds, which was very useful.
Also GIFs could be used for sprites in games, whereas jpeg could not.
When PNGs came around, they weren’t initially supported in browsers at the time (IE 5/6/7?), so GIFs were still the format of choice for transparency until mainstream browsers finally added full PNG support.
Internet Explorer supported PNG, it just lacked support for alpha transparency. Meaning you could use transparent indexed PNGs (256 color, just like GIF) but it was problematic to use high-color PNGs (you rarely see high-color GIfs, and they never are animated).
I remember trying to get PNG files to display in Internet Explorer 5 and 6. It didn’t work. Not just the transparency, it would simply display a broken image place holder. That kept me from using PNG for a couple of years, waiting for IE users to catch up.
it was like this: https://en.wikipedia.org/wiki/Portable_Network_Graphics#Web_browser_… *some* support starting with IE 4, various flaws until IE 9
Edited 2016-08-23 14:30 UTC
jessesmith,
Same here, PNG support was very buggy and incomplete. I also recall color reproduction issues even when no transparency was used. The worst part about it was that we couldn’t ignore IE, it became the lowest common denominator. It cost the world years of progress. Oh well, at least it’s a new day, and we have different problems…haha.
Edited 2016-08-23 15:21 UTC
I think the GIF’s staying power is the same thing that causes Animated PNG to be a flat-out violation of the PNG standard (which requires that the PNG file header and mimetype only be used for single-frame files):
It allows users to sneak animations into sites which weren’t supposed to allow them but the developers were too busy, lazy, or unskilled to block animated GIFs.
(Which is why, to this day, Mozilla bundles their own libpng and, when I allow user-specified images, I always host them locally and either block or strip excess frames on both GIFs and PNGs.)
I really wish browser vendors would get their act together on this and at least start working on an HTML attribute or CSS property to disable animation on images.
Edited 2016-08-23 00:33 UTC
I don’t think it’s a lack of alternative formats – mp4/webm are superior to gif in just about every way – especially for the kinds of content that are being encoded and shared.
The reason gif sticks around is because it uses the HTML img tag, which doesn’t have any convoluted counter productive rules (like not loading on mobile, or restricted auto playing, etc.), and is backwards compatible for-basically-ever. In no small way, those short sighted attempts at bandwidth saving have directly caused a resurrection of a less efficient (by A LOT) format for motion graphics.
The format isn’t the problem, access is. This hypothesis suggests a way to replace gif – allow HTML5 video (with one codec) to be linked in img tags (without audio).
Oh yeah the codec problem – we have too many (2 is 1 too many). So, there’s that idiocy too.
Edited 2016-08-23 02:17 UTC
Here’s an HTML5 video (with audio) which sums up what I feel as a web developer:
https://www.youtube.com/watch?v=umDr0mPuyQc
As I said, we’re long overdue for an HTML attribute or CSS property to disable animation without requiring browser extensions like “Toggle animated GIFs”.
(I’ve gotten used to throbbers being frozen on their first frame because it’s less bothersome than allowing animation from user avatars and signatures and the like.)
ssokolow,
It could probably be done without too much fuss. However blocking the animation at the CSS level forces you to download those frames anyways. It seems kind of conflicting to download animated gifs on the one hand while telling the browser not to animate them on the other – it would be better to send an unanimated version in the first place to save resources.
Also, there’s no guaranty web sites will set the CSS flag the way users prefer, for that reason it might be for users to take matters into their own hands:
http://techdows.com/2013/02/disable-animated-gifs-in-chrome-firefox…
Except you’re forgetting the C in CSS, which stands for ‘Cascading’. It’s inherently designed to allow user choice. All major browsers have some way (often deeply hidden) to force loading a custom CSS file after loading all the CSS from the page itself, which lets you do pretty much whatever the hell you want with the page because the last loaded rules override earlier rules.
ahferroin7,
Accessibility mandates that there still needs to be a browser setting/plugin in order for normal people to use it since messing with CSS is a non-starter for them.
CSS styles shouldn’t be format specific, so would a CSS animation-blocker flag apply to other formats too? I still dislike the use case where a website would make a user download potentially thousands of frames only to inhibit them in the browser using CSS.
This specific feature seems like a minor change, but where do we draw the line with using CSS to implement local user preferences? We could conceivably allow a user to adjust the playback speed, enable/disable OCR, audio equalization, codec parameters, language selection, speech to text closed captioning, etc. The problem is if we start adding all these things to CSS standards, it will become increasingly bloated with user needs that arguably might be best left to the browsers & plugins rather than CSS after all.
Just food for though, either way it’s not something I’m all that bothered about. Others may feel more strongly about it.
Edited 2016-08-23 14:47 UTC
In Principe anything presentation should be left to the display agent and user-preference profiling. WWW should be pure, undefined multi-streaming [as “In the beginning was the Word,..]. From a humble 2D watch to an ultra HD-3D renderer. It should be end point work and fine tunning.
It’s just philosophy. But one that could go one long, long way into the future.
Playful comment, ahferroin7. CSS laking scope management.
Why would it be in CSS? Wouldn’t it be a user choice?
Carewolf,
That’s my feeling too, but it seems the answer is “because we can”…
You are stating that animation is never a good thing. Much like disabling the blink tag. Yes, animation is often overused especially back in the mid 90’s where it was used because it could be used. However there are cases where animated Gifs or animation in general are useful method of portraying information. Such as multi-dimensional graphs where data changes over time an animation can help us see trends better than static graphs. Also their disadvantage of being very distracting can also be important to force us to be distracted to emphasise some information more than what normal text can do.
Animated [statistical] graphs, as one example. This issue of auto-rendering very interesting.
Progressive jpeg being another example. If well remembering We could stop their download by simply pressing browser’s stop button.
Is not active content actually -just progressive display(ing).
Never studied image formats. Don’t know if gif can be safely rendered as being downloaded. If so, could also be safely interrupted [a la progressive jpeg].
Video can be both paused and interrupted, at download as well as rendering. A very good example of civilized stream behavior.
A first frame containing a resume or an extended explaining tag showing as We mouse hover it. My preferred way to show progressive render.
[Suspecting that auto-play by default is more of complacency to monetizing schemes, than something inherent to file format specifications]. Money
Fun fact: GIF isn’t actually limited limited to 256 color. The format supports multiple images per file that stack over each other, each with its own palette. You can divide a true color image into multiple 256-color images.
This is part of the original GIF87a format. The later update, GIF89a, takes advantage of that, adding the ability to delay the appearance of each subsequent image, and define one of a couple ways to handle the already cleared data (Clear it, leave it, and one or two other weird options, I think), allowing it to do animation.
Drumhellar,
Interesting, I didn’t realize that’s how that worked!
Still, I can’t imagine it would have compressed very well though. A 16bit color image would potentially need up to 256 different frames along with their own palettes. Something that might have been both simpler and worked alot better is to divide the image into 3 frames (one for red/green/blue), each using 8bit colors without any palette. I don’t think GIF has a mode for updating just a single color value at a time.
Edited 2016-08-23 01:04 UTC
Well, technically, an image using all colors available in a 16-bit color scheme would need 257 images – you only get 255 colors in each image, since you need transparency in all but the rear-most image.
(Yeah, I was kinda bored, so I did the math)
As for finer-grained updating of the image like you suggested, I’m not sure exactly what you’re getting at – do you mean, add a blue value to existing red pixels? That is far beyond the scope of what GIF does, but I suppose you could add that – the format is designed to be extended by adding custom application blocks – loop support in GIFs was added by Netscape – loop information is stored in what is called the Netscape Application Block – not part of the GIF standard itself, but stored in a way provided by the standard.
AFAIK, the three ways animated gifs update the screen is to clear existing pixels before painting, leave existing pixels and paint over, and paint over existing pixels, but add an offset when drawing, though I may be wrong on that last part.
Also, there are a few tools scattered around the internet for true-color GIFs. A Go version is available here: https://github.com/donatj/tcgif
A more comprehensive demonstration is available here:
https://notes.tweakblogs.net/blog/8712/high-color-gif-images.html
Now, a 36,000 GIF is about 4x the size of the same image saved as a PNG, but, I wonder how a 512 or 1024 color GIF is in comparison to a 24-bit PNG…
There used to be a more comprehensive library designed more general use, meant to be integrated into graphics software, but the site doesn’t seem to exist anymore. Oh well.
Drumhellar,
Haha, it’s unlikely that any of us are creating gifs anymore anyways.
A few years back, I was making animated gifs… for the PSP. I made a routine that allowed you to use ani-gifs as sprites on the screen, making it super-easy to handle animated sprites and insert them into your game.
Whoops, posted I link and then found it was already in another message. Sorry.
Edited 2016-08-25 12:02 UTC
I blame it on Mozilla: there was a time when they the power to change the web and during that time it happened that animated PNG came to light, still Mozilla sumbled on it: first by refusing to support MNG for obscure reasons, then years later invented APNG, a competing format. There was no viewer (browser) support, there were few creation tools, of course animated PNG was dead-on-arrival.
True (see my post below) but where is BNG support ?
check this: https://bugzilla.mozilla.org/show_bug.cgi?id=18574 (“restore support for MNG animation format and JNG image format”), one of the most voted feature request in Mozilla history. at some point it even had a working patch contributed but the maintainer simply refused it (and went to create APNG).
Well MNG was overengineered and if you excuse my language: buggy/buggered as all fuck. (I implemented MNG support in KHTML back in the day).
so we got stuck with GIF, is this better overall?
Yeah, blame Mozilla for picking a winner. GIFs days are numbered, and Animated PNG won. It’s in Firefox, Safari and soon will be in Chrome. Game over.
You get it backwards: Mozilla could have made animated PNG into a winner but they didn’t (who else can you expect to push an open standard, Microsoft?). With nobody of importance supporting it, animated PNG got stuck in a chicken-and-egg cycle and animated GIF got no challenge.
Apparently you missed this part: “soon will be in Chrome”.
Read the last few posts in here:
https://groups.google.com/a/chromium.org/d/topic/blink-dev/KcMjmFOgG…
Wonderful, so many years to support ONE image format.
“Compatibility Risk”
Internet Explorer: Public skepticism, let’s wait a bit until the public goes receptive for unsupported format
Seriously…
The Animated GIF is a great boon to all designers/developers. They are easy to create, support transparencies, create appropriate-sized images of sufficient quality. The tools to create them are not overly complex as they are designed for creating down-market images, try LICEcap to see how easy and elegant a GIF capture tool can be. I can knock up an animated GIF for use in a tutorial in 30 secs. To do the same with a video file, takes time, requires complicated tools to do something simple. The resulting video is large and uses enormous bandwidth. Animated GIFs can be hosted on image hosting sites such as imgur, tinypic and so your images can be shared on an easy-to-construct CDN and other sites can take the bandwidth. The animated GIF is only annoying when the content is not what you want. When used properly for demos, examples then it is essential. Animated PNGs do not yet work on all browsers and they are inherently too high quality and therefore too large.
Have a look here and see how I’ve used two animated .GIFs, one as a demo, the other as attractive content:
http://lightquick.co.uk/downloads/steampunk-weather-widget-mkii.htm…
Long live the Animated GIF!
Edited 2016-08-23 11:26 UTC
MNG was made to replace animated GIF, but there was no real decent editor (beside Jasc AnimationShop) so people hacked animated PNG instead. And the fact that browsers dictates the file format support.
Here is a funny story about creating MNG files: for a long time, in the (rare) case when I need an animated GIF I create it with GIMP, you need to have each frame in a different layer and simply export it.
I just checked, and now GIMP has an option in the export dialog to save as MNG (I don’t remember it being there a few years ago), so in theory I can easilty create MNG files. The tricky part: on my installed Linux distro, there is no viewer able to open it and check the export worked. Hell, not even GIMP is able to open it, reporting “Unknown file type”!!! (and yes, I have libmng installed).
A total mess.
http://i0.wp.com/wfnk.com/blog/wp-content/uploads/2016/03/camacho.g…
http://cachemonet.com/
As someone who has done web development in the past. GIFs were the bane of my existence. No alpha channel. Complete bullshit.
Edited 2016-08-27 23:26 UTC