[Newsletter Archive] PNG Reprint

Archival note: Although information contained in OIT Newsletter articles was current at the time of publication, some details may no longer reflect the present state of technology and the Office of Information Technology.

February 1997, Vol.1 No.11 | Information Technology
Newsletter | February Table of Contents

PNG: For a Healthy Image

by Rich Landers, Information & Education Services, InterNIC News

PNG origins

InterNIC News Reprint
From the January 1997 edition of InterNIC News.
<http://rs.internic.net/nic-support/nicnews/jan97/png.html>
"PNG provides a patent-free replacement for GIF"

Technology Watch

Are the days of creating gif images for the World Wide Web coming to an end? Well, that's not likely to happen soon, but as graphics and web technology continue to merge and improve we can expect to see some significant enhancements to graphic capabilities. Perhaps the most notable WWW graphics enhancement to come along recently is the Portable Network Graphic (PNG).
"Microsoft Office 97 uses Portable Network Graphics (PNG) as its native lossless compressed graphic image format. PNG allows us to drastically reduce the size of files that contain graphics and allows us to implement transparency in our new OfficeArt drawing component. Since PNG is a small and platform-independent format, Office users can easily exchange graphical documents across the web." Jon DeVaan, Vice President of Office product development, Microsoft Corporation

"PNG is the breakthrough in color imaging on the web that finally allows everyday users to easily display high-quality images on their web pages. HP and Microsoft are particularly pleased to have PNG support RGB in its effort to accurately communicate color across the web." Michael Stokes, Project Manager, Color Research, Hewlett-Packard Research Laboratories; Chairman, International Color Consortium

Before I go any further on this topic I feel obliged to inform my readers that PNG is pronounced "ping" by people who sound as if they know what they're talking about, and it also will appear as an extension to the PNG filename (for example, "image.png").

The World Wide Web Consortium (W3C), the Internet specification organization, has endorsed PNG as a graphics algorithm. "On the web, images may be represented in many different formats," W3C remarks. "Clients vary as to the set of formats they support, and servers vary in the formats which they provide. The data is transferred in whatever seems to be the `best' format which the client and server have in common." PNG has passed muster with the W3C, and the consortium has recently issued the following statement on PNG:

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. The Internet Media Type image/png was approved on 14 October 1996.

A quick review of basic image-compression principles may help to clarify the true strengths and weaknesses of PNG. Image-compression techniques broadly fall into two different types: lossless and lossy.

* Lossless compression compresses the image so that it is identical to the original;

* Lossy compression compresses the image by permanently throwing out some of the image data.

Nevertheless, well-implemented lossy compression schemes can achieve far higher compression ratios than any lossless method while producing results that the untrained eye cannot usually distinguish from the original.

Digitized Electronic Images

.GIF, .JPEG and .TIFF. There are hundreds of file formats, but these are the most popular ones used by graphic artists, web artists and multimedia specialists.

Graphics Interchange Format (GIF) is the universal standard graphics compression algorithm and is an 8 bit 256 color graphic that is compressed by squeezing all colors in the graphic down to 256 colors. It was developed as a proprietary format for the digital transmission of images over Compu-Serve's online service. Colors that are within an acceptable range to say a predefined green, are mapped to that green color during compression. The problem is that the Macintosh, PC and Unix platforms all define different system palettes, thus GIFs can look different on different platforms.

Joint Photographic Experts Group (JPEG) offers compression in stages, and is the industry standard for compressing 24-bit and 8-bit color or gray-image files. GIF images take up less space than JPEG images, but they represent only 8-bit images and 256 col ors, whereas JPEG supports 24-bit images and 16.7 million colors. JPEG is also mainly used by Web artists but can extend to 16 million colors and is the preferred format choice for pictures that contain a lot of hues and complex colors. The quality is best with JPEG.

Tagged image-file format (TIFF) are used mainly for desktop publishing and can contain RGB or CMYK color information. Graphic artists frequently convert TIFFs to JPEGs in webpage production.

PNG as a New Internet Standard

The development of the PNG specification is supported by Compu-Serve, the original creators of the GIF format, who wished to see PNG become accepted as the new Internet standard format for lossless graphics. PNG was developed in response to a need for faster loading, enhanced quality cross-platform graphics. One of the features it will provide for the web enthusiast is a consistent visual effect on a variety of different platforms and browsers.

Automatic gamma correction permits PNG files to be correctly displayed on Macs, PCs, SGI workstations, etc. (all of which have different gamma values) without appearing either too light and faded or too dark and contrasty. It accomplishes this by storing the source gamma used by the image author. Chromaticity data can also be stored in PNG files and used by Color Management Systems on the viewing platform to compensate for differing monitor types; an important capability where precise color matching is required (for example, brand recognition, product design, medical applications, fine art and on-line catalogs).

PNG images are also more economical with memory space. During the W3C testing phase, indexed color PNG files averaged about 30% smaller than the equivalent GIF, and truecolor PNG files were 30-40% smaller than the equivalent (LZW compressed) RGB TIFF.

Although the developers of PNG acknowledge that it produces a graphic that is far superior to GIF, it is not a competitor for JPEG, which is still the preferred graphics format for lossy storage of images. Also, since the GIF format is the accepted standard for web graphics on any platform, it is not likely to be replaced by PNG overnight. Nevertheless, the PNG enhancements are something that should be considered when creating web graphics, because PNG may very well become the lossless standard in the next few years.

A technical specification for PNG is available at http://www.boutell.com/boutell/png/PNG-CRCAppendix.html, or for a spiffy demo on PNG interlacing see http://www.wco.com/~png/pngpics.html [and] http://guest.jpl.nasa.gov/PNG/pngpics.html.

Go to http://codelab.siegelgale.com/solutions/ to install a plug-in that allows you to see PNG images directly in your web browser.


© 1996-97 Office of Information Technology <http://www.umn.edu/oit>
University of Minnesota <http://www.umn.edu>
Information Technology Newsletter <http://www.umn.edu/oit/newsletter>