ARCHIVE: JPEG, GIF, or PNG

Last modified: February 12, 2009 - 03:11

Should you store your pictures in JPEG, GIF, or that fancy new PNG format?

JPEG is an image file format designed to make photographs very small for transmission back in the early days of dial up internet connections. JPEG has unlimited compression that squeezes the life out of images as you increase their compression. One image might look good compressed up to 30 percent while another survives compression to 50 percent and the next image looks horrible at 20 percent compression. The problem with editing JPEG files is the constant reapplying of that destructive compression.

GIF was another early attempt at producing small files from simple graphics but was meant for diagrams and drawings with few colours.

PNG arrived later, stores simple drawings in a similar way to GIF, and can handle the photographic images usually stored as JPEG. PNG is free open source with no software patents to restrict your use. PNG can store high quality images without the destructive compression used in JPEG and can still achieve similar levels of compression. The secret is that PNG stores pixel perfect images without destruction of information then compresses the pixel perfect result with a non destructive compression.

Choose PNG instead of GIF. Consider PNG as an alternative to JPEG for storing your precious high quality original images and for creation of those small thumbnail images used to index JPEG collections.

Alpha Channel Transparency

GIF has a nice transparency feature that makes it useful when placing one image over another image or over text. GIF cannot handle full colour images and JPEG has no transparency. What do you do? Use PNG because PNG can mix full colour with transparency using something called Alpha Channel Transparency. Unfortunately some browsers decided to display PNG files without Alpha Channel Transparency. When you want to use an image with a transparent background and you want to support older browsers, you might have to remain with GIF.

Image Editors & PNG

GIMP is the premier free open source image editor and supports most of the PNG file format's features. It is also a very good image editor in general.

Most modern image programs (i.e. Photoshop, Picasa, etc.) handle PNG files, but offer varying levels of support for specialized PNG features.

 
 

Drupal is a registered trademark of Dries Buytaert.