Portable Network Graphics (PNG)

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

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

PNG was slow to be adopted by companies like Microsoft so the format did not catch on right away. All modern 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 tends to be a more efficient format, however, there are occasions where a PNG file can be larger than a GIF file because PNG is capable of storing more color depth and transparency information than GIF. 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.

PNG is standardized, whereas 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. 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.