Graphics and the Internet
PNG
The PNG format (Portable Network Graphic, pronounced PING) has often been touted as a replacement for GIFs, but so far it doesn’t seem to have taken off. This month we’re going to find out a bit more about it.
Currently, you’ll find two main graphics formats on Web pages: GIF and JPEG. GIFs and JPEGs are pretty wonderful but they can also be a little bit irritating at times, too.
GIFs are lossless so you won’t lose any image quality, but they only support up to 256 colors. JPEGs support millions of colors, but they are lossy and aren’t particularly good at rendering text. File sizes are significantly reduced by JPEG compression, but the resulting quality can be poor.
As you can see, both image formats have their limitations. PNG gives us an alternative.
One problem with GIF is that it is not an open format, meaning that if you plan to write some GIF creation software you’ll be required to obtain a licence from Unysis. That may be okay for big companies like Adobe, but not so fun for freeware and shareware programmers.
In 1994 Unysis started actively chasing up these licenses. As you can imagine, the Internet community was annoyed, so a group of enthusiasts led by Thomas Boutell put together plans for a better, free, lossless graphic format to replace the GIF: PNG.
I feel that the following are the major features of the PNG file format.
Colors
While GIF only supports 256 colors, PNG supports ‘truecolor’ images.
Transparency
GIF lets you choose to make a certain color transparent so everything underneath shows through. However, if you have a shadow edge (for example) on an image, unless you know the background color, the resulting image will look odd. PNG supports alpha-channel transparency so that regardless of the background the image is placed over, it looks fine. This is better explained in the example below.
|
As you can see, the shadow area on the GIF image doesn’t look as good as the PNG.
File Size
PNG boasts file sizes up to 25% smaller than GIF.
Gamma Correction
That sounds a bit scary, doesn’t it? Well, it’s not as bad as it sounds. Images created on a Mac generally look darker on a PC, and PC-created images look paler on a Mac. This is because different computer systems and monitors interpret color values differently. Gamma correction makes allowances for these differences. PNG supports gamma correction, so a PNG image should look almost identical on all major platforms.
Animation
Unlike GIFs, the PNG format doesn’t support animation—which, believe me, is a good thing!
So Why Hasn’t PNG Taken Off?
While PNG has been accepted by the World Wide Web Consortium (W3C), and most image editors (such as Photoshop, CorelPaint, and GraphicConverter) can write PNGs, browsers have been slow to accept the format and to implement support for all of PNG’s features. This is happening gradually; if you want to use PNG images, try them out on a few non-essential images on the site and see what visitor feedback you get.
Netscape (Mac & PC) from version 4 and Internet Explorer from version 4 (PC) and version 5 (Mac) all support the PNG format, although they don’t yet fully support all of its features. iCab supports PNG very well, but doesn’t support some features like gamma correction. To see if your browser supports PNG visit this page. The image is quite large, which gives you the opportunity to see PNG’s interlacing as it downloads.
One of the other reasons PNG hasn’t taken off is ignorance. Whenever you read an Internet graphics tutorial, all you read about is GIF this and JPEG that. PNG rarely gets a mention. It would be good if PNG took, but history has shown that the stronger product doesn’t necessarily win the market.
• • •
Although this column has covered just the basics of PNG, you can learn more at the PNG Web site. If there is enough interest, I may return to PNG in a future column.
Happy holidays, everyone!
Also in This Series
- PNG · December 2000
- Seven New Deadly Internet Graphic Sins · November 2000
- Seven Deadly Internet Graphic Sins…or Things That Look Really Bad on Web Pages · October 2000
- The Animated GIF · September 2000
- The GIF File Format · August 2000
- Banner Advertisements · July 2000
- JPEGs and JPEG Compression · June 2000
- Help, I Can’t Draw! · May 2000
- Copyright · April 2000
- Complete Archive
Reader Comments (3)
Here's some generic info. JPEG and GIF are the most common web site formats. JPEGs are generally best for photographs and GIFs are generally best for graphics with fewer colors (GIFs can only display up to 256 colors). PNG has been intended as a substitute for web graphics, combining the best features of JPEG and GIF. For some reason, it hasn't really been fully embraced and I don't see them too often. EPS and TIFF files are more often used for desktop publishing needs. a TIFF is a bitmapped image, just like a JPEG, but without the lossy compression. TIFFs can be 1-bit (black and white only, with no shades of grey or color), greyscale, RGB color, CMYK color, and more. EPS files can either be a bitmap with a small EPS header attached for the purpose of defining clipping paths, duotone information, halftone information, etc.; or the better use is as a vector graphic where, instead of individual pixels, you define anchor points and instructions to draw a linestraight or curvedto another anchor point. The line can be defined as essentially any thickness and color and style. When lines form a closed shape, the shape can be filled with a color, a gradent, or another shape. EPS files also do not degrade when you enlarge them.
Add A Comment