Navigation path

Portable Network Graphics (PNG)

Portable Network Graphics ( PNG ) is an extensible file format for the lossless, portable, well-compressed storage of raster images. PNG provides a patent-free replacement for GIF and can also replace many common uses of TIFF. Indexed-color, grayscale, and truecolor images are supported, plus an optional alpha channel for transparency. Sample depths range from 1 to 16 bits per component (up to 48bit images for RGB, or 64bit for RGBA).    


Portable Network Graphics ( PNG ) is an extensible file format for the lossless, portable, well-compressed storage of raster images. Indexed-color, grayscale, and truecolor images are supported, plus an optional alpha channel for transparency. Sample depths range from 1 to 16 bits per component (up to 48bit images for RGB, or 64bit for RGBA). Is an ISO standard, ISO/IEC 15948:2003 (E) .

The motivation for creating the PNG format came in early 1995, after Unisys announced that it would be enforcing software patents on the LZW data 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 Multiple-image Network Graphics (MNG) has been defined for animation.

PNG uses a non-patented lossless data compression method known as deflation. This method is combined with prediction, where for each image line, a filter method is chosen that predicts the colour of each pixel based on the colours of previous pixels and subtracts the predicted colour of the pixel from the actual color. An image line filtered in this way is often more compressible than the raw image line would be. On most images, PNG can achieve greater compression than GIF, but some implementations make poor choices of filter methods and therefore produce unnecessarily large PNG files.

The GIF file format has allowed portions of images to be transparent, allowing them to appear to have a shape that is not rectangular. However, the GIF method was considered to be rather poor because it only allowed individual pixels to be fully transparent or fully opaque. The PNG format improves upon this by also supporting an 8-bit alpha channel, so pixels in an image can have partial transparency. However, it took a long time for web browsers to fully support transparency, and some, notably Internet Explorer (for Windows), still do not.

Other image attributes that can be stored in PNG files include gamma values, background color, and textual information.

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.


  • Version 1.0 of the PNG specification was released on 1 July 1996, and later appeared as RFC 2083. It became a W3C Recommendation on 1 October 1996.
  • Version 1.1, with some small changes and the addition of three new chunks, was released on 31 December 1998.
  • Version 1.2, adding one extra chunk, was released on 11 August 1999.

PNG is now an   ISO standard, ISO/IEC 15948:2003 (E) , also released as a W3C Recommendation on 10 November 2003. This version of PNG differs only slightly from version 1.2 and adds no new chunks.

In late 2004, an animation extension: Animated Portable Network Graphics(APNG) was proposed which, while retaining the ability to render the first frame as a normal PNG in decoders that do not understand the APNG format, also contains additional chunks which allow it to act as an animated image similar to a GIF file in a decoder which does understand the extension.

Why use PNG?

The PNG format is a suitable format for the web applications next generation. PNG provides a useful format for the storage of intermediate stages of editing. Since PNG's compression is fully lossless--and since it supports up to 48-bit truecolor or 16-bit grayscale--saving, restoring and re-saving an image will not degrade its quality. The advantages are:

  • Not a "flat" image.  Individual objects can be edited later.
  • Reasonable file sizes. Supports high-level lossless compression.
  • Allows for much additional information to be stored within the image.
  • Supports alpha channel transparency. The advantage over GIF's transparency support is that you can do gradiants and color mixing. Like if you have a web icon that you want to have a drop shadow, you can setup PNG to have the shadow work irregardless of the background your using. With GIF you'd have to create a new icon with different tinted shadow for each background your using.
  • Supports gamma correction (cross-platform control of image brightness).
  • Supports two-dimensional interlacing (a method of progressive display).
  • Can use many different palettes.
  • So PNG is superior to GIF in the way that it can do real transparencies, and it supports a much higher amount of colors.
  • PNG is lossless (unlike JPEG). Were as each time you open up a PNG file and edit it, then save it, it still is a sharp and nice as when you first made it. That is each time you open JPEG in a editor, then you save it again as a JPEG (even at its highest quality settings) you loose information and the picture looses quality.
  • Patent free. Non-patented lossless data compression method (Open Source).
  • This will be the next "standard" web format.

On the other hand, does not recommend PNG because:

  • Older browsers and programs may not support PNG files.
  • PNG provides less compression than the lossy compression of JPEG.
  • PNG offers no support for multi-image files or animated files (like alternative MNG format). The GIF format supports multi-image files and animated files.
  • For transmission of finished truecolor images -especially photographic ones-JPEG is almost always a better choice. Although JPEG's lossy compression can introduce visible artifacts, these can be minimized, and the savings in file size even at high quality levels is much better than is generally possible with a lossless format like PNG.
  • For transmission for black-and-white images, particularly of text or drawings, TIFF's Group 4 fax compression is often far better than 1-bit grayscale PNG.

File Extension and others notes:

  • .PNG:..... PNG image.

The MIME media type for PNG is image/png (defined by IANA).
MNG does not yet have a registered MIME media type, but video/x-mng can be used.

Web Browsers Support: All latest versions of browsers support PNG format.

  • Internet Explorer. Microsoft's Internet Explorer (MSIE) supports inline PNG images in versions 4.0b1 and later. MSIE supports PNG images but is unable to correctly display images with alpha transparency; partially transparent pixels will be displayed as fully opaque
  • Netscape Navigator has supported inline PNG images since version 4.04.

MNG is currently not as widely supported as PNG. Nonetheless, Netscape and Konqueror have native MNG support, and MNG plugins are available for Opera and Internet Explorer. Mozilla originally supported MNG, but native support for MNG was removed in version 1.5a and Mozilla has not supported the format since. Safari does not support MNG.

References & Background information:

ISO standard, ISO/IEC 15948:2003 (E) . Portable Network Graphics (PNG) Specification (Second Edition) Information technology — Computer graphics and image processing — Portable Network Graphics (PNG): Functional specification. ISO/IEC 15948:2003 (E).

The W3C's PNG Page.

The PNG Home Site.

PNG: The Definitive Guide.

Adobe PHOTOSHOP. The official site of the last version of PHOTOSHOP.

CorelDRAW. The official site of the last version of CorelDRAW.

MS VISIO 2002 Standard Edition. The official site of VISIO 2002 SE.


Related tools and services

  • Recommended Authoring Graphics Tools:
    • Adobe Photoshop 7. (For discussion: Attention nowadays is Status EV)
    • CorelDraw 10. (For discussion: Attention nowadays is Class C)
  • Recommended Authoring Graphics Tools (for non-professional use):
    • Microsoft Visio 2002.
    • Graphical tools provided by the operating system or Office (Paint 5.1, Photoed 3.0).

Evolution of standard

  • The PNG specification was first issued as a W3C Recommendation on 1st October, 1996 (press release) and updated to a second edition incorporating all errata on 10 November 2003. This edition is also an ISO standard, ISO/IEC 15948:2003 (E) .
    This means it is a mature document that is considered to contribute towards realising the full potential of the Web.


Please consult SyslogRestricted area: This link points to internal pages and may not work if you are browsing as an external user., the training information system, which gives you access to the training catalogue, the training map and allows you to introduce your application for a training course.



  • How to decide the correct format for an Image.

Roles (concerned)