[Home]PNG

HomePage | Recent Changes | Preferences

PNG (pronounced ping) is a relatively new bitmap image format that is becoming popular on the Web and elsewhere. Officially, PNG stands for Portable Network Graphics, but some people prefer PNG's Not GIF.

The motivation for creating the PNG format came in early 1995, after Unisys? announced that it would be enforcing its patent on the LZW compression algorithm used for GIF. There were also other problems with the GIF format which made a replacement desirable, notably its limitation to 256 colours at a time when computers capable of displaying far more than 256 colours were becoming common. Although GIF allows for animation, it was decided that PNG should be a single-image format. A companion format called MNG has been defined for animation.

PNG uses a non-patented lossless compression method known as deflation, originally defined by [Phil Katz]? for version 2 of his PKZIP? archiving tool. Deflation is a combination of LZ77 and Huffman coding. PNG combines compression with prediction: for each image line a filter method is chosen which predicts the colour of each pixel based on the colours of previous pixels and subtracts the predicted colour of the pixel from the actual colour. An image line thus filtered is often more compressible than the raw image line would be. PNG can achieve greater compression than GIF on almost any image, but some early implementations made poor choices of filter methods and therefore produced unnecessarily large PNG files.

A PNG file consists of an 8-byte signature (89 50 4E 47 0D 0A 1A 0A in hexadecimal) followed by a number of chunks, each of which conveys certain information about the image. Chunks declare themselves as critical or ancillary, and a program encountering an ancillary chunk that it does not understand can safely ignore it. This chunk-based structure is designed to allow the PNG format to be extended while maintaining compatibility with older versions.

The MIME media type for PNG is image/png (approved on 14 October 1996).

External link:


HomePage | Recent Changes | Preferences
This page is read-only | View other revisions
Last edited December 3, 2001 1:35 am by Robbe (diff)
Search: