Linked by Thom Holwerda on Mon 22nd Aug 2016 23:03 UTC
Internet & Networking

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.

Order by: Score:
couldn't read it
by unclefester on Mon 22nd Aug 2016 23:43 UTC
unclefester
Member since:
2007-01-13

The GIFs were so annoying I gave up trying to read the article!

Reply Score: 3

RE: couldn't read it
by panzi on Tue 23rd Aug 2016 01:03 UTC in reply to "couldn't read it"
panzi Member since:
2006-01-22

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).

Reply Score: 4

RE[2]: couldn't read it
by Alfman on Tue 23rd Aug 2016 01:19 UTC in reply to "RE: couldn't read it"
Alfman Member since:
2011-01-28

panzi,

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).


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.

Reply Score: 6

RE[3]: couldn't read it
by Detlef Niehof on Tue 23rd Aug 2016 17:06 UTC in reply to "RE[2]: couldn't read it"
Detlef Niehof Member since:
2006-05-02

The article only used these "fake gifs".

The one above the article is a true GIF:

1467821488-gif-shark-dolphin.gif (838 KB)

Apart from that, you seem to be right.

Reply Score: 1

GIF transparency
by Alfman on Mon 22nd Aug 2016 23:57 UTC
Alfman
Member since:
2011-01-28

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.

Reply Score: 8

RE: GIF transparency
by nicubunu on Tue 23rd Aug 2016 06:01 UTC in reply to "GIF transparency"
nicubunu Member since:
2014-01-08

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).

Reply Score: 3

RE[2]: GIF transparency
by jessesmith on Tue 23rd Aug 2016 14:25 UTC in reply to "RE: GIF transparency"
jessesmith Member since:
2010-03-11

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.

Reply Score: 3

RE[3]: GIF transparency
by nicubunu on Tue 23rd Aug 2016 14:28 UTC in reply to "RE[2]: GIF transparency"
nicubunu Member since:
2014-01-08

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

Reply Score: 4

RE[3]: GIF transparency
by Alfman on Tue 23rd Aug 2016 15:02 UTC in reply to "RE[2]: GIF transparency"
Alfman Member since:
2011-01-28

jessesmith,

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.


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

Reply Score: 4

Comment by ssokolow
by ssokolow on Tue 23rd Aug 2016 00:32 UTC
ssokolow
Member since:
2010-01-21

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

Reply Score: 2

RE: Comment by ssokolow
by CaptainN- on Tue 23rd Aug 2016 02:13 UTC in reply to "Comment by ssokolow"
CaptainN- Member since:
2005-07-07

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

Reply Score: 5

RE[2]: Comment by ssokolow
by ssokolow on Tue 23rd Aug 2016 04:11 UTC in reply to "RE: Comment by ssokolow"
ssokolow Member since:
2010-01-21

The reason gif sticks around is because it uses the HTML img tag


That "uses the HTML img tag" part is sort of what I was getting at:

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.


Back to your comment...

allow HTML5 video (with one codec) to be linked in img tags (without audio).


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.)

Reply Score: 2

RE[3]: Comment by ssokolow
by Alfman on Tue 23rd Aug 2016 04:52 UTC in reply to "RE[2]: Comment by ssokolow"
Alfman Member since:
2011-01-28

ssokolow,


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".


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...

Reply Score: 2

RE[4]: Comment by ssokolow
by ahferroin7 on Tue 23rd Aug 2016 13:10 UTC in reply to "RE[3]: Comment by ssokolow"
ahferroin7 Member since:
2015-10-30

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.

Reply Score: 1

RE[5]: Comment by ssokolow
by Alfman on Tue 23rd Aug 2016 14:40 UTC in reply to "RE[4]: Comment by ssokolow"
Alfman Member since:
2011-01-28

ahferroin7,

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.



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

Reply Score: 2

RE[6]: Comment by ssokolow
by dionicio on Tue 23rd Aug 2016 21:35 UTC in reply to "RE[5]: Comment by ssokolow"
dionicio Member since:
2006-07-12

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.

Reply Score: 2

RE[5]: Comment by ssokolow
by dionicio on Tue 23rd Aug 2016 21:18 UTC in reply to "RE[4]: Comment by ssokolow"
dionicio Member since:
2006-07-12

Playful comment, ahferroin7. CSS laking scope management.

Reply Score: 2

RE[3]: Comment by ssokolow
by Carewolf on Tue 23rd Aug 2016 12:44 UTC in reply to "RE[2]: Comment by ssokolow"
Carewolf Member since:
2005-09-08

Why would it be in CSS? Wouldn't it be a user choice?

Reply Score: 2

RE[4]: Comment by ssokolow
by Alfman on Tue 23rd Aug 2016 14:42 UTC in reply to "RE[3]: Comment by ssokolow"
Alfman Member since:
2011-01-28

Carewolf,

Why would it be in CSS? Wouldn't it be a user choice?


That's my feeling too, but it seems the answer is "because we can"...

Reply Score: 2

RE: Comment by ssokolow
by theTSF on Tue 23rd Aug 2016 12:46 UTC in reply to "Comment by ssokolow"
theTSF Member since:
2005-09-27

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.

Reply Score: 4

RE[2]: Comment by ssokolow
by dionicio on Thu 25th Aug 2016 14:28 UTC in reply to "RE: Comment by ssokolow"
dionicio Member since:
2006-07-12

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].

Reply Score: 2

RE[3]: Comment by ssokolow
by dionicio on Thu 25th Aug 2016 14:36 UTC in reply to "RE[2]: Comment by ssokolow"
dionicio Member since:
2006-07-12

Video can be both paused and interrupted, at download as well as rendering. A very good example of civilized stream behavior.

Reply Score: 2

RE[3]: Comment by ssokolow
by dionicio on Thu 25th Aug 2016 14:43 UTC in reply to "RE[2]: Comment by ssokolow"
dionicio Member since:
2006-07-12

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 ;)

Reply Score: 2

Comment by Drumhellar
by Drumhellar on Tue 23rd Aug 2016 00:45 UTC
Drumhellar
Member since:
2005-07-12

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.

Reply Score: 6

RE: Comment by Drumhellar
by Alfman on Tue 23rd Aug 2016 01:00 UTC in reply to "Comment by Drumhellar"
Alfman Member since:
2011-01-28

Drumhellar,

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.


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

Reply Score: 2

RE[2]: Comment by Drumhellar
by Drumhellar on Tue 23rd Aug 2016 01:32 UTC in reply to "RE: Comment by Drumhellar"
Drumhellar Member since:
2005-07-12

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.

Reply Score: 4

RE[3]: Comment by Drumhellar
by Alfman on Tue 23rd Aug 2016 04:20 UTC in reply to "RE[2]: Comment by Drumhellar"
Alfman Member since:
2011-01-28

Drumhellar,

(Yeah, I was kinda bored, so I did the math)


Yeah, I know the palette doesn't require a transparency value to exist, but in order to use the technique you need to use transparent pixels, so it looks like I was off by one ;)

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


I realize it's not part of the existing GIF spec, but I think it would have been a trivial change to make. IE make it virtually identical to a grayscale frame with the addition of a color mask so that only one color can be updated each frame instead of all 3.


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



Nice find, back in the day I dithered colors but this would have been more impressive. The Jasc GIF creator I was using didn't support this trick, unless I were to do each frame by hand...ugh.


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.


Haha, it's unlikely that any of us are creating gifs anymore anyways.

Reply Score: 2

RE[4]: Comment by Drumhellar
by JLF65 on Tue 23rd Aug 2016 05:54 UTC in reply to "RE[3]: Comment by Drumhellar"
JLF65 Member since:
2005-07-06

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.

Reply Score: 2

RE[2]: Comment by Drumhellar
by Mark0 on Thu 25th Aug 2016 12:01 UTC in reply to "RE: Comment by Drumhellar"
Mark0 Member since:
2005-08-11

Whoops, posted I link and then found it was already in another message. Sorry.

Edited 2016-08-25 12:02 UTC

Reply Score: 1

Mozilla
by nicubunu on Tue 23rd Aug 2016 05:52 UTC
nicubunu
Member since:
2014-01-08

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.

Reply Score: 3

RE: Mozilla
by Kochise on Tue 23rd Aug 2016 11:25 UTC in reply to "Mozilla"
Kochise Member since:
2006-03-03

True (see my post below) but where is BNG support ?

Reply Score: 2

RE[2]: Mozilla
by nicubunu on Tue 23rd Aug 2016 11:39 UTC in reply to "RE: Mozilla"
nicubunu Member since:
2014-01-08

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).

Reply Score: 3

RE: Mozilla
by Carewolf on Tue 23rd Aug 2016 12:46 UTC in reply to "Mozilla"
Carewolf Member since:
2005-09-08

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).

Reply Score: 3

RE[2]: Mozilla
by nicubunu on Tue 23rd Aug 2016 12:47 UTC in reply to "RE: Mozilla"
nicubunu Member since:
2014-01-08

so we got stuck with GIF, is this better overall?

Reply Score: 2

RE: Mozilla
by Phil2 on Wed 24th Aug 2016 05:28 UTC in reply to "Mozilla"
Phil2 Member since:
2010-05-26

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.

Reply Score: 1

RE[2]: Mozilla
by nicubunu on Wed 24th Aug 2016 05:37 UTC in reply to "RE: Mozilla"
nicubunu Member since:
2014-01-08

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.

Reply Score: 2

RE[3]: Mozilla
by Phil2 on Wed 24th Aug 2016 06:56 UTC in reply to "RE[2]: Mozilla"
Phil2 Member since:
2010-05-26

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...

Reply Score: 1

RE[4]: Mozilla
by Kochise on Wed 24th Aug 2016 09:46 UTC in reply to "RE[3]: Mozilla"
Kochise Member since:
2006-03-03

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...

Reply Score: 2

GIF reinvented
by yerverluvinunclebert on Tue 23rd Aug 2016 11:20 UTC
yerverluvinunclebert
Member since:
2014-05-03

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

Reply Score: 2

RE: GIF reinvented
by Kochise on Tue 23rd Aug 2016 11:23 UTC in reply to "GIF reinvented"
Kochise Member since:
2006-03-03

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.

Reply Score: 2

RE[2]: GIF reinvented
by nicubunu on Tue 23rd Aug 2016 11:48 UTC in reply to "RE: GIF reinvented"
nicubunu Member since:
2014-01-08

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.

Reply Score: 2

Comment by ezraz
by ezraz on Tue 23rd Aug 2016 17:04 UTC
ezraz
Member since:
2012-06-20
GIF lovers check this
by Meanwhile on Wed 24th Aug 2016 15:37 UTC
Meanwhile
Member since:
2005-09-03
Comment by abraxas
by abraxas on Sat 27th Aug 2016 23:23 UTC
abraxas
Member since:
2005-07-07

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

Reply Score: 2