Graphic Formats: Usage of JPEG, GIF and PNG
GIF, JPG and PNG formats are supported by all web browsers. Other formats such as BMP and TIFF are supported only by Windows based browsers and are not part of the web standards, so be careful when you work with images and avoid mixing format types. A common error is to rename the file extension of a .BMP file as .JPG, Internet Explorer will detect the right format and display the image, but other browsers such as Firefox won't do it. When you work with image editing software be sure to "Save As.." images to the chosen format. Never rename the file extension.
GIF and PNG are similar: the main difference is that GIF can only support 8-bit color (or a palette no greater than 256 colors). It may also handle dithering poorly, which is the result of pixels in a graphic that try to mix themselves up to emulate different colors. Photographs saved as GIF can also lose their detail and a wide range of values. PNG can handle a 24-bit palette providing 32 millions of colors. Both formats can include transparent backgrounds and are ideal to display words (titles, text and buttons) and line-art graphics.
Another advantage of GIF is that it supports frames and can be used to animate images. Most banners and animated icons are saved in GIF format.
JPEG is superior in rendering color and detail found in photographs or graphics using blends, gradients, and other tonal variations. It also provides for greater compression options allowing you to set the perfect balance between quality and file size. For photographs JPEG has a better compression (smaller file size - faster to download) than PNG.