When to use GIFs or JPEGs

Now that you have seen both GIFs and JPEGs in action, when should you use each one? Well, GIFs are much better at compressing line art, text and other illustrative type designs. They preserve exact colors and compress very small. They do not, however, work well on photographs due to the restriction of 256 colors. This is when JPEGs work well. JPEGs preserve all of the subtle color variations in a photograph much better. Although it is a lossy file format, if attention is paid when compressing, the discarded data will go largely unnoticed.


Illustration
6-Bit Gif - 11.4KB 60% JPEG - 23.3KB
Photograph
6-Bit Gif - 26.7KB 60% JPEG - 19.8KB



Next Demo: Static Images in Flash