rss

Video and digital imaging - The PNG format

PngPlus

PNG format

The PNG format (Portable Network Graphics or Ping format) is a bitmap (raster) graphic file format. It was developed in 1995 in order to provide a free alternative to the GIF format, which is a proprietary format whose rights are held by Unisys (proprietor of the LZW compression algorithm), to whom all software publishers using this type of format are under obligation to pay royalties. Thus, PNG is also a recursive acronym for PNG Not GIF.

Characteristics of the PNG format

The PNG format makes it possible to store images in black and white (a colour depth of 16 bits per pixel), true color (a colour depth of 48 bits per pixel), as well as indexed images, using a palette of 256 colours.

Moreover, it supports alpha channel transparency, i.e. the possibility of defining 256 levels of transparency, while the GIF format only allows one colour of the pallet to be defined as transparent. It also has an interlacing function which makes it possible to show the image gradually.

The compression offered by this format is a (lossless compression) 5 to 25% better than GIF compression.

Finally, PNG stores image gamma information, which makes a gamma correction possible and allows it to become display-device-independent. Error correction mechanisms are also stored in the file in order to guarantee its integrity.

Structure of a PNG file

A PNG file comprises a signature, making it possible to indicate that it is a PNG file, followed by a series of elements called chunks. The signature of a PNG file (in decimal notation) is the following:

137 80 78 71 13 10 26 10
The same signature in hexadecimal notation is:
89 50 4E 47 0D 0A 1A 0A

Each chunk comprises 4 parts :

  • The size, a non-signed 4-byte integer, describing the size of the chunk
  • The chunk type: a 4-character (4-bytes) code comprised by ASCII alphanumeric characters (A-Z, a-z, 65 to 90 and 97 to 122) allowing the nature of the chunk to be established
  • The chunk data
  • The CRC (cyclic redundancy check), a 4-byte correcting code which allows the integrity of the chunk to be checked

The chunks can be present in any order except that they must start with the header chunk (IHDR chunk) and finish with the end chunk (IEND chunk)

The main chunks (called critical chunks) are:

  • IHDR bitmap information header
  • PLTE Palette
  • IDAT Image data
  • IEND Image trailer

The other chunks (called ancillary chunks) are the following:

  • bKGD Background color
  • cHRM Primary chromaticities and white point
  • gAMA Image gamma
  • hIST Image histogram
  • pHYs Physical pixel dimensions
  • sBIT Significant bits
  • tEXt Textual data
  • tIME Image last-modification time
  • tRNS Transparency
  • zTXt Compressed textual data

More information


This document entitled « Video and digital imaging - The PNG format » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.
 
Tips & Tricks relevant found in the knowledge base
18/05 00h56To insert an image in the FAQFAQ
23/05 18h07[Kioskea] Who are the contributors? How to contribute?Kioskea
More tricks on « PNG »
Software found in the relevant downloads
Download FastStone Image Viewer 3.5 3.5FastStone Image Viewer 3.5 - FastStone Image Viewer is a fast, stable, user-friendly image browser, converter and editor. It has a nice array of features...Category: Photo album
License: Freeware/gratuit
Download PC Inspector File Recovery 4.0PC Inspector File Recovery - PC INSPECTORâ„¢ File Recovery is a data recovery program that supports the FAT 12/16/32 and NTFS file systems. Finds...Category: Backup
License: Freeware/gratuit
Download Beneton Movie GIF 1.1.2Beneton Movie GIF - Beneton Movie GIF is a free animated GIF editing tool. It is simple, quick, and effective. <h2> </h2> Require : A...Category: Animation
License: Freeware/gratuit
Download ToYcon 0.6ToYcon - ToYcon is an easy to use free and fast png to ico convertor. Only a simple drag and drop of one (or several) images is...Category: Customization
License: Freeware/gratuit
More freeware about « PNG »