Ping!

PNG has come out of the oven

Links

For further information on PNG, you can check out these links below:

W3C's introduction to the PNG specification
Michael Battilana's article discussing the legal history of the GIF/LZW controversy:


Home
Contents
Contents
Contents

The legal wrangles over the compression routines in GIF files have created a new file format, but not just as good as gif - better. Chris Hanretty looks at PNG today.

In the beginning

Twenty years ago, Israel researchers Jacob Ziv and Abraham Lempel, who later went on to create LZH - Lempel Ziv Huffman (presumably with someone named Huffman), published papers on a new class of lossless data compression algorithms, now referred to as LZ77 and LZ78.

In 1983, Terry Welch of Sperry, which was to become UniSys, developed a (fast) variant of LZ78 called LZW. Welch filed for a patent, as did two IBM researchers. The USPTO granted both patents. Legal confusion already. At the moment, LZW had nothing to do with graphics at all

Into this Compuserve, (my ISP), who were designing a new online graphics format, as they felt that no format already available was good enough: at that time, it wasn't. BMP files, the other PeeCee `standard' are to put it conservatively, quite big. GIF had been designed from the outset to have small file sizes, which was good for 9600 baud modems. GIF, which stood for Graphics Interchange Format, had LZW in it. At this moment in time, UniSys was only pursuing a patent, and even then, had little intention of hunting down software products, choosing to go after hardware manufacturers.

The end of 1994, in the middle of the Christmas holidays an announcement was made. Compuserve, as first target of the new UniSys hard line, had reached a joint agreement with Unisys to start collecting royalties from authors of GIF supporting software. The shit hit the net shortly after. While others ranted and raved, Thomas Boutell decided that another format was needed to replace GIF. Smaller, better, faster, nicer, prettier, more extensible and any other adjective required. Oh, and free.

The first working PNG viewer was released on 11 Mar 95, and the first PNG images two days later. Talk about putting the cart before the horse! In 1996, PNG was ratified with IANA, to become image/png, and spec 1.0 was released as a W3C recommendation.

Featuring...

PNGGIFJpeg
alpha channelYesNoYes
Gamma correctionYesNoYes
Progressive displayYesYesNot fully supported yet
Multiple images (animation)NoNo

The Real World

It's all very well discussing at length, but people want to know what tangible benefits PNG will bring. I decided to conduct a very quick test, using any old rubbish that I found lurking around.

No, seriously, I did.

GIFPNGILBM
1. Archive
Image size 68*45
256 cols

Filesize: 3,271 bytes

Filesize: 3,248

Filesize: 4,674
2. Oasis Album cover
Image size 180*180
256 cols

Filesize: 28,975

Filesize: 27,337

Filesize: 35,662
3. Old Browser Test
Image size 400*308
256 cols

Filesize: 35,694

Filesize: 34,838

Filesize: 59,750
Apart from showing ILBM up, the table gives PNG the edge, but only just. The difference in file sizes is minimal, anything from 100 bytes - 1 kilobyte being the usual.

It must be remembered though, that PNG is also capable of 24 bit images As I don't have a 24 bit PNG supporting paint package, I can't test the file sizes in comparison to JPEG, but as always, large 24 bit finished photorealistic images should be Jpeged.

The future

PNG is now one of the two required image formats for VRML, the other being JPEG, and once NetScape supports PNG, the road should be clear. MSIE v4 supports PNGs, and every Amiga browser does, thanks to the wonder(!) that is datatypes. In fact, I'm not aware of any major platform that doesn't have a PNG supporting web browser.

The only area GIF can laugh in the face of PNG is multiple image files, or to the common man in the street, animations, but already, the team behind PNG is working on MNG (Ming the merciless?), and that will presumably leave GIF dead in the water.

And, to complete the trio, also in the works is WNG, short for Wavelet Network Graphics (wing). WNG uses wavelets to minimize file sizes, and is a lossy file compression routine that has JPEG in its sights.

The Verdict

Well, the Amiga certainly is well up there in terms of PNG support, with PPaint being the first commercial PNG supporting program, and all Amiga web browsers having PNG capabilities in some form. Unless you want to count Alynx

I can't see any reason why PNG shouldn't go on to conquer the world. It's free and open, and is plainly better than Gif. Obviously, it'll take time, but already I have seen the official NewIcons support site with PNGs, and I'm seriously considering using PNG as the de facto image standard on The Lair!. I understand that it will upset those of you who are using Navigator and pre-v4 of Internet Explorer on the PeeCee, but with more sites going down the PNG road, it's one I'll be thinking about. mail me if you want to shout in my ear