News for hackers. Stuff that matters.
Re:What's In A GIF by wladimir on Thursday November 24, 2011 @04:09AM (#3273725)
Nice and clear overview!

But GIF? Is that format even still used?

I'd love to see this for webp, I really don't get that format yet and AFAIK there is no overview of the format that is not a spec (i.e., horribly detailed).

Re:What's In A GIF by pornel on Thursday November 24, 2011 @04:29AM (#3273782)
> Is that format even still used?

http://httparchive.org/interesting.php

34% of images on the web.

The Web needs education first, not another image format that those websites won't use...

Re:What's In A GIF by wladimir on Thursday November 24, 2011 @04:41AM (#3273811)
Wow that's shockingly many still. But that statistic is to be expected somehow, there's a lot of old sites still around. Still it's a horrible, incredibly restricted format.

I come from a computer graphics background an thus am interested in image formats and how they work... whether the web "needs" webp doesn't really come into it.

Re:What's In A GIF by robin_reala on Thursday November 24, 2011 @04:38AM (#3273804)
To be fair, the vast majority of the web is built and never touched again, so I’m not surprised about that figure.

Regarding WebP, it’s nice to have options, but ImageOptim is getting PNGs down close in size for me :)

Re:What's In A GIF by icebraining on Thursday November 24, 2011 @06:34AM (#3274014)
Not true, a ton of sites go offline after a few years. If Geocities was still around it'd probably skew that value way up ;)
Re:What's In A GIF by robin_reala on Thursday November 24, 2011 @08:38AM (#3274274)
Geocities is still around (under a different name): http://reocities.com/
Re:What's In A GIF by blots on Thursday November 24, 2011 @05:30AM (#3273899)
What about all the smileys? Does that account for the 34%?
Re:What's In A GIF by jayfuerstenberg on Thursday November 24, 2011 @04:34AM (#3273797)
Thanks for sharing this very useful resource!
Re:What's In A GIF by retube on Thursday November 24, 2011 @05:03AM (#3273850)
Well gifs still have two main use-cases:

- with the rise of AJAX a gif is basically the default format for the animated "loading" spinners

- crappy low-res instant versions of youtube videos

Is there an alternative format?

Re:What's In A GIF by wladimir on Thursday November 24, 2011 @05:22AM (#3273886)
(1) is indeed a use-case, unless you require more detailed control over playback/pause/frame numbers. In which case a series of png images (for example, encoded into a .css) and animated using javascript could be used. Google uses this for their doodles.

I think (2) is not really a good use-case. GIF is a terrible, terrible format for movies because of the crappy quality and inefficient interframe encoding. Just use a movie format, they're also good at low-res low-bitstream.

Re:What's In A GIF by AndrewDucker on Thursday November 24, 2011 @05:45AM (#3273922)
Using a movie format means that you either have to provide multiple versions for different browsers or you have to use Flash.

For a four-second clip of a man being hit in the face with a cat I'm not sure either of those is worthwhile.

Re:What's In A GIF by wlievens on Thursday November 24, 2011 @07:02AM (#3274069)
I'd think CSS sprited PNGs are much preferred over anigif, not just because of playback control but also because of non-shitty translucency.
Re:What's In A GIF by satori99 on Thursday November 24, 2011 @05:15PM (#3275548)
(2) is used alot by porn sites (So i hear).

Mouse hovers show an animated GIF representation of the 'film' as a preview.

Re:What's In A GIF by icebraining on Thursday November 24, 2011 @06:38AM (#3274022)
There are decent (and scalable!) spinners in CSS, but it's not an alternative since not every browser supports them.
Re:What's In A GIF by ahrjay on Thursday November 24, 2011 @03:35PM (#3275350)
Firefox and Opera support the APNG format and there is a clever polyfill[1] to add support to all other browsers.

[1] https://github.com/devongovett/png.js

Re:What's In A GIF by flomo on Friday November 25, 2011 @04:11AM (#3276638)
Beyond AJAX spinners, there's still plenty of use cases for simple & easily embedable animations. Smilies, forum avatars, icons, etc.
Re:What's In A GIF by chrislomax on Thursday November 24, 2011 @08:20AM (#3274214)
Am I missing something here? Why would a GIF not still be used? We use them all the time for less detailed images to keep file sizes down?
Re:What's In A GIF by simcop2387 on Thursday November 24, 2011 @11:20AM (#3274705)
I've generally avoided GIFs myself, originally because of patents. Lately though it's because with optipng/pngcrush being told to try every possible compression option on them I can usually get small images down to under 500 bytes, sometimes much better than I could ever do with a GIF. This seems to mostly be due to the fact that around certain sizes a true color PNG may compress better than a palleted image.
Re:What's In A GIF by chrislomax on Thursday November 24, 2011 @11:27AM (#3274725)
Interesting, I wasn't being a dick asking that. I was genuinely interested on what I was missing out on. I don't understand images to anywhere near the extent of most people commenting here but I was interested enough to try and understand the article, "try" being the operative word.
Re:What's In A GIF by rimantas on Friday November 25, 2011 @02:22AM (#3276487)
In most cases you will get better results with PNG. PNG has a slightly bigger overhead, so GIF wins for extremely tiny images (with a size about a dozen pixels or less) but after that more advanced compression algorithm in PNG wins. However, you have to remember to choose the right type of PNG (there is no sense in saving black-and-white lineart as true-color PNG). PNG also may containt chunks of additional info, you can get rid of them too. Also, there is an interesting PNG8 format which allows you to have alpha transparency with indexed color palette in supporting browsers, but in IE6 it will behave just like gif with index transparency (pixels having any transparency will appear completel transparent). See http://www.sitepoint.com/png8-the-clear-winner/
Re:What's In A GIF by chrislomax on Friday November 25, 2011 @03:29AM (#3276584)
That is really cool, thanks for the tip

Whenever I save an image as a PNG it is almost certainly bigger but I let PS do the work for me these

I'll take a look at this format as it seems to be a really clever time saver of having to render a version of each image twice

Re:What's In A GIF by simcop2387 on Friday November 25, 2011 @01:41PM (#3277837)
I'd also definitely take a look at some of the png optimizers. They work by tweaking the parameters of the compression so it's a lossless operation (some of them will do some depth reduction in a lossless way if possible, but that doesn't always bring in better compression). Photoshop has been somewhat well known for not always producing an optimized png.
Re:What's In A GIF by mseebach on Thursday November 24, 2011 @08:43AM (#3274283)
I think the GP is confusing an interesting general knowledge piece with something that should be immediately relevant to his day-to-day work.

You probably don't want to be crafting GIF binaries directly anyway, there are tons of libraries that take care of the plumbing for you very competently.

Re:What's In A GIF by xtracto on Thursday November 24, 2011 @09:49AM (#3274453)
I think the "loading" animated icons you see in all those AJAX applications are just GIFs. It makes sense.