PNG

From MobileRead
Jump to: navigation, search

PNG stands for Portable Network Graphics format.

Contents

[edit] Overview

PNG is a bitmapped graphic format that employs a lossless compression system. It was designed to improve upon and replace GIF files back when the GIF patent was in effect. PNG does not require a patent license. Its main drawback is the complexity of its color model. It supports many different color schemes including both palettes and direct with differing number of bits. Some software that support PNG may specify that it only supports 8 bit images or have other restrictions on what is supported.

[edit] Features

  • multiple CRCs so that file integrity can be checked without viewing
  • ultra-clever magic signature that can detect the most common types of file corruption
  • better compression than GIF, typically 5% to 25% (but often 40% or 50% better on tiny images)
  • non-patented, completely lossless compression (note GIF patent has run out)
  • two-dimensional interlacing scheme
  • 1-, 2-, 4- and 8-bit palette support (like GIF)
  • 1-, 2-, 4-, 8- and 16-bit grayscale support
  • 8- and 16-bit-per-sample (that is, 24- and 48-bit) truecolor support
  • full alpha transparency in 8- and 16-bit modes, not just simple on-off transparency like GIF
  • "palette-alpha" mode, effectively transforming normal RGB palette into RGBA
  • gamma correction for cross-platform "brightness" control
  • color correction for cross-platform, precision color
  • both compressed and uncompressed text chunks for copyright and other info

[edit] Transparency

PNG files with more bits per pixel can use some of those bits for transparency. For example a 32 bit pixel might use 24 bits for color (8 for each of the 3 primary colors) and 8 bits for transparency. This is similar to the transparency of GIF images but an existing color is not used. Instead the amount of transparency can be defined per color so that some amount, but perhaps not all, of a background image can show through.

[edit] Compression

The default compression can be a problem in PNG in an attempt to make the resultant image as small as possible. A comparison of the various PNG compression tools is at: http://css-ig.net/png-test-corpus.

Some of these compression schemes are not truly lossless as they can cause a color definition loss when reducing the number of colors in the image.

[edit] MNG

MNG stands for Mutiple-image Network Graphics. It is an extension of the .PNG image format that uses indexed colors and supports image animations; similar to an animated .GIF file, but uses higher compression and features full alpha support (multi-level transparency). It can be used for multiple images, animation, and transparent JPEG. JNG is the extension used for transparent JPG.

The home page for MNG is http://www.libpng.org/pub/mng/

[edit] Tools

See Editing graphics for regular graphics tools. Here are some specific PNG ones:

[edit] For more information

Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox