This was originally written and submitted to Slashdot on 25 February 1999 in response to an item about yet another stupendously wonderful yet proprietary image format that will no doubt conquer the world in three months or less, etc., etc. It was also partly in response to a typically overexcited HotWired article by Jeff Veen that came out at about the same time, and the title was an intentional reference to an older Slashdot book review (The Story About Ping--oops, didn't get my title quite right). Sadly, my article didn't actually get posted by the Slashdot staff until three weeks after it was submitted, by which time several of the references (e.g., ``Monday'') no longer made much sense. So it goes. [Click here for the followup story, 16 months later.]

The Story of PNG

Greg Roelofs
25 February 1999

I hadn't intended to write up anything so soon, but there's been a lot of FUD and some general cluelessness lately about the Portable Network Graphics (PNG) image format, so here's an update from somebody who knows a tiny bit about it.

First of all, PNG is certainly not dead, although it obviously has not taken the Widely Webbed World completely by storm (which, in the eyes of the esteemed Mr. Veen, amounts to the same thing). For better or for worse, Netscape Navigator and Microsoft Internet Explorer pretty much define what counts as acceptable Web technology, and they only began supporting PNG natively in the autumn of 1997 (versions 4.04 and 4.0, respectively). As various Slashdotters have noted, neither one really supports PNG well yet, at least with respect to alpha transparency and gamma correction, but that's coming; let me return to that in a moment.

PNG has been making steady progress, however, particularly in non-Web applications. It has advanced from being a newsworthy ``extra'' to being an expected, standard component of image applications; in other words, a viewer or editor that ships without PNG support is considered deficient by both consumers and the trade press. That's a moderately subtle point--it doesn't necessarily leap right out at you and scream, PNG has arrived, dammit!, but it's nevertheless quite a significant milestone for any new technology. Mundane can be good. (By the way, I maintain the PNG home site and list known PNG-supporting applications of various persuasions on half a dozen pages; stop by if you're in need of something, and please let me know if I've missed any!)

But that's just one data point. Everybody's favorite technical publisher, O'Reilly and Associates, not only includes PNG chapters in a number of its books (including Web Design in a Nutshell and Programming Web Graphics with Perl & GNU Software), they also published an entire 350-page book completely devoted to the Portable Network Graphics format: PNG: The Definitive Guide. It consists of around 300 pages of main text, some fairly cool color figures, and assorted odds and ends; in addition, the complete source code to the three demo programs discussed in the book is freely downloadable and reusable under a BSDish license. (I happen to know because I wrote it. :-) It hit the stores in late June, and so far folks seem to like it....)

In addition, PNG has been published as an informational Internet RFC and a W3C Recommendation (the very first one), and it's now wending its way through the slowly grinding gears of joint ISO/IEC standardization. That will all help ensure its longevity, but it's also fairly boring to most of you, I'm sure.

So getting back to the Web issue, let me briefly summarize PNG's basic capabilities:

The patent issue is largely history, except to shareware and freeware authors, for whom it's still quite real--Unisys lawyers continue their apparent crusade to kill all low-cost GIF-supporting software. What really matters to Web developers, however, is PNG's support for palette images (no, they don't all have to be really fat, 24-bit monsters); its support for alpha transparency even in palette images; its support for gamma and color correction; and the fact that its compression is lossless (which is why 24-bit PNG images are so fat, especially compared to lossy JPEG). In other words, for the same number of bytes as a binary-transparency GIF image, you can have a lovely alpha-palette PNG image that, thanks to gamma correction, will not look too light on Macs or too dark on PCs. The alpha support means it can be anti-aliased or drop-shadowed to look good against any background, not just a single, flat color. Note that MSIE 4.0 already supports gamma correction, and 5.0 for the Mac is supposed to do full alpha transparency; so far there's no word when (or if) the Windows version will ever catch up. Mozilla/Netscape 5.0 will also support both alpha and gamma, or else--I'm the nominal ``owner'' of Mozilla's PNG support, and now that the book is done, I've been doing some serious hacking in conjunction with Pam Nunn. (Apologies for the 10-month delay!) Amazingly enough, the WebTV browser already handles 32-bit RGBA just fine, though it has problems with the palette version.

Since PNG pushes the envelope on a lot of image-related stuff--alpha transparency (no other Web formats), RGBA-palette images (no other format, period), gamma and color correction (almost no other formats), and even compression/filtering (it has a bunch of free parameters that one can tweak)--many of the current applications are somewhat behind in supporting some of the features. Be patient; things are steadily improving. I won't point fingers at any underperformers here, but I will note that the GIMP is quite strong in compression and 32-bit RGBA and should have fully working gamma code in the next release after 1.0.2; and Fireworks 2.0 is already outstanding in its RGBA-palette support.

I'm hopeful the book will help many of the others--it includes a lot of material aimed at helping programmers to improve their code, but also a lot of stuff to help users avoid problems and make the best of what options they've got. And if I have time while I'm working on Mozilla, I plan to release a free, automatic 32-bit to 8-bit (RGBA to RGBA-palette) converter to handle what seems to be the hardest PNG feature to support. Such conversion literally gives you a factor-of-four reduction in file size with essentially no visible loss (no more than normal RGB-to-palette conversion with nice dithering, anyway).

So...that, in a largish nutshell, is the past, present and future status of PNG. As for new competition, well, let's just say that there have been lots and lots and lots of fantastically improved, incredibly stupendous image formats that have come and gone over the years; ``WI'' is merely the latest, and SVG and JPEG2000/JPEG-LS are right around the corner. Anybody remember Johnson-Grace/AOL's ART format? How about Iterated Systems' fractal format (FIF)? Or some of the quadtree-based ones, or SPIHT, or FlashPix, or JPiG, or CMP, or ePIC, or HARC-C? Heck, even JPEG with arithmetic compression is noticeably better than standard DCT-Huffman JPEG (5-10%), but does anybody actually use it? No. Proprietary standards are simply not tolerated very well on the Web. Even free, open standards like PNG (with free, open-source, non-GPL'd reference libraries) have a huge barrier to climb. It took ``standard'' JPEG four years to catch on; it's taken PNG four years to catch on (yes, it's really been that long, and 2.5 years since the W3C Recommendation); and, barring largish miracles--e.g., Netscape and Microsoft cooperating--it will take any other new image format just as long.

There you have it. There's lots more info on the web site, and there are a couple of mailing lists for folks who really want to get gnarly with PNG. Oh, and please buy the book. ;-)

[primary site hosted by SourceForge] Last modified 14 March 2009.

Copyright © 1999-2009 Greg Roelofs.