Tuesday, November 28, 2006

Image formats for web

It is important to optimize your web page. Images make up over 50 percent of web page. So, choosing the right image format is the first step in optimizing web graphics. There are 3 formats using in web, GIF, PNG and JPEG. You should expect the smallest file size while the picture is acceptable. I will not go to the technical details of every image format. There are a few tips for choosing the image format.

A logo with only a few colors: GIF or indexed PNG
GIFs and PNGs are palette-based, with file size related to the number of colors.

A photograph: JPG
JPEGs are designed to efficiently compress smooth-toned images such as photographs. You can control the quality of your images. The smaller file size produces jaggier image.

Anything with transparency: GIF
IE doesn’t support partial transparency in PNG.

Short animations: GIF
Every popular web browsers don’t support Motion PNG (MNG).

Local storage of original images: full color
PNGFull color PNG offers lossless compression. That provides perfect image quality but much larger file size than a JPEG.