|GIF nearly Free!
(06 Jul 2004 at 10:01)
|Attention all shoppers.|
Unisys's last international patent on LZW compression expires tomorrow. That means that we're finally free to use GIFs without fear of being sued, and more importantly to safely include gif-encoding routines in free software. (The Escape server side will soon be making GIF screenshots.)
I wonder what the guys at burn all GIFs are going to do now?
|But pngs are better!
Maybe now they can use LZW as their compression algorythm.
|Well, PNGs support 24 bits, gamma, and alpha, but they're usually bigger and the format is pretty cumbersome. Animation is typically unsupported. It's nice to have a lean format for low-res graphics.|
|Hmm, they are almost always smaller, as far as i can remember. I know that Microsoft Paint makes horribly giant pngs for no good reason. Irfanview, on the other hand, makes em as small as pngcrush can.
Maybe you aren't using the palette mode? Lossy pngs beat gifs.
As for animation.... there's mng, but i've yet to see much support for that. Although it is out there.
|Yeah, PNGs aren't lossy. I meant that a PNG with 213 colors beats the 213 color GIF.... as opposed to the 24-bit PNG vs. the 213 color GIF.|
|Note that PNGs can be indexed color as well, and then can be super dooper small like GIFs. People usually compare a 24-bit PNG to a dithered (is that correct in graphics speak?) 256-color GIF, but a better comparison if you only want to compare on the grounds of size is an indexed-256-color PNG with a GIF.
But yeah, GIFs are definitely great for animations. Except, of course, when 256 colors is not okay for your animation, so really I would love to see that MNG thing catch on! I hadn't heard of it before.
|Yes, I was referring to the indexed-color mode of PNGs. For the 24-bit stuff, there is no competition for PNG. I did a little experiment comparing indexed-color PNGs and GIFs, and the result was pretty much a wash -- PNGs with lots of colors (~256) are slightly smaller than GIFs (when compressed with 'state of the art' compressors), but very low-color GIFs are smaller than PNGs. Photoshop does a worse job of PNG export than it does with GIFs, though, so if you're not running pngcrush and gifsicle afterwards, then GIF will be smaller.
Anyway, IMO the simplicity of the GIF standard is a win. It is quite easy to generate GIFs with a small amount of code, but I don't share the same opinion of PNGs.
|Simplicity is something i can accept.
I'm interested in what sorts of files PNG does worse on. I've tried 'convert' on a bunch of gifs i have sitting around, big and small, and PNG did better on all of them. (I used 'convert' which made them smaller than the GIFs. And then 'pngcrush' would make them even smaller.)
I can't find a GIF optimizing program right now, though. (Do you know of one?) So i dunno.
PNG is a better standard, don't let photoshop's craptasticy fool you. And i say that with no real authority.
|Gifsicle is the best I know at optimizing gifs, especially animations. Did PNG win by a significant margin? It didn't in my tests.|
|I had an average of 15% reduction.|