Portable Network Graphics (PNG)

From Free Knowledge Base- The DUCK Project: information for everyone
Revision as of 19:33, 6 July 2014 by Admin (Talk | contribs)

Jump to: navigation, search

Portable Network Graphics (PNG) was designed as a replacement for the GIF format in order to avoid infringement of Unisys' patent on the LZW compression technique. PNG offers better compression and more features than GIF, animation being the only significant exception. PNG is more suitable than GIF in instances where true-color imaging and alpha transparency are required.

Although support for PNG format came slowly, new web browsers generally support PNG. Older versions of Internet Explorer do not support all features of PNG. Versions 6 and earlier do not support alpha channel transparency without using Microsoft-specific HTML extensions. Gamma correction of PNG images was not supported before version 8, and the display of these images in earlier versions may have the wrong tint.

PNG files can be much larger than GIF files in situations where a GIF and a PNG file were created from the same high-quality image source, as PNG is capable of storing more color depth and transparency information than GIF. However, for identical 8-bit (or lower) image data, PNG files are typically smaller than the equivalent GIFs, due to the more efficient compression techniques used in PNG encoding. Complete support for the GIF format is complicated chiefly by the complex canvas structure it allows, though this is what enables the compact animation features.

legacy text:

Introduced in 1995 as a free alternative to Unisys's greedy patent claim on the GIF format, PNG was slow to be adopted by companies like Microsoft so the format did not catch on right away. Today PNG is supported by all the major web browsers. PNG builds on the idea of transparency in GIF images and allows the control of the degree of transparency, known as opacity. PNG uses deflate compression and is sometimes preprocessed in a way that helps it compress better. PNG does not support animation like GIF does.

A PNG stream consists of a number of data chunks. Each chunk stores its type and size, then follows the chunk data, then a CRC-32 checksum value. PNG image types are Grayscale, with 1, 2, 4, 8 or 16 bits per sample, RGB truecolor, with 24 or 48 bits per pixel, Paletted, with 1, 2, 4 or 8 bits per pixel. Like GIF, the PNG format supports transparency. Howevever, unlike GIF, PNG can do it on truecolor images. Both grayscale and truecolor can store an alpha channel which contains transparency information.