Wednesday, November 18, 2009

Ping!

Shortly after the Earth cooled, and the waters receded, dinosaurs roamed the land. After an interval, the Internet and World Wide Web were developed and we came to need a way to display images online.

The old, dead, CompuServe network had already trod this path, and arrived at a marvelously clever solution for its day, the .gif file. Say “Jiff” or “Giff”, it doesn’t matter. The Graphics Interchange Format allowed for 256 colors—and one of them could even be “Invisible”. Transparency and interlacing were two of .gif’s best features, animation a powerful third reason to use it on your next page. The file format quickly became a favorite of anyone with only a few colors to display, anyone who needed to have a background image shine through around whatever was being displayed, or anyone who needed a very little motion on their page. The format was a perfect fit for most logos and graphics needs, not great at portraiture or landscape photography, though.

For that kind of richly textured image, you needed to use the other format, .jpg, from the Joint Photographic Experts Group. “Jay-Peg” files could feature as many colors as anyone needed, with correspondingly larger file sizes. But these could be slimmed-down quite a bit by means of lossy compression, by rounding-off sixteen hundred different kinds of Green to only a dozen or so. Most people don’t notice any difference at lower levels, and even when cranked up quite a bit the result is very often still Good Enough.

And, truthfully, it was a Good Enough kind of time back then. Most machines were connected, if that’s the word, via a none-too-fast modem. And quite a bit of computer output was limited to 256 colors back then, too. To see richer color required an extra expenditure for a state of the art video card, and even then the results were squirted onto only a 13” or 14” color monitor, probably. So yeah, Good Enough was good enough, for most of us.

A recurring theme of this blog is that Things Will Not Always Be Like This. And so it was in the graphics world. Video cards improved, monitors improved and online transmission speeds improved. But .gif and .jpg stayed the same. This happens in business until there is a compelling reason to move and in the middle 1990s it started to look like we might get that, when patents and lawsuits and confusion shared the world stage with rumors and no small amount of fear. The online subscription model was in trouble (I had two networks shot out from under me within a year or so, General Electric’s GEnie and Microsoft’s The Microsoft Network). Why would anyone think the people who owned the wasting asset of CompuServe would be willing to sit by and watch everyone continue to use their image format, for free?

This being the Internet, most people got most of the story wrong, of course. Unisys owned the patent for the creation of .gif, but stories floated out every week or so that one day we would all have to send a nickel to someone to display our animated Under Construction graphics. Work began on a replacement.

The fruit of that labor was the Portable Network Graphics format, .png (“Ping!”). .png files can be even smaller than .gif format files, they offer various levels of transparency and don’t suffer from generational losses the way .jpg files do. Save 20% of file size with every edit and you quickly get below 50% of the original .jpg image quality. Animating .png is not as easy as with .gif, but .png files don’t cloud up with artifacts when sharp color differences are present, as with high-contrast colors or text appearing in an image.

The .png file might be king today but for its missing the shipping deadline for the most-popular Web browser of the day, Microsoft’s Internet Explorer 6 for the PC. A lot of the gee-whizziness of .png was lost in IE6, so developers and designers had to ask themselves if it was worth going that extra mile for a file only twenty percent of visitors might even appreciate. For most, the answer was no, and so .gif and .jpg reigned supreme through another browser cycle.

Today, we even more need of high-quality images and graphics than ever before, and today we have the technology to back it up. If you are working in High Definition levels of image detail, consider breaking the old .gif or .jpg habit and trying a .png file for the task. You might surprise yourself—and your page visitors, too.

No comments: