Details on when to use correctly for the web. Gifs are more suited for flat color, line art or cartoon images.
when to use gifs, lzw compression algorithm, photographs and gifs, flat color gifs, line art, cartoons

When to use GIFs

The Gif file format should ideally be employed for line art, cartoons and images that contain text because they preserve the sharp lines of shapes and text in the graphic. Further, line art and cartoons generally contain areas of flat color, which is very well suited for the LZW compression algorithm.

Note the difference in file sizes of the images below.

8 color Gif image
8 color Gif image
409 bytes
Jpg image
Jpg image
1234 bytes
   
6 color Gif image
6 color Gif image
879 bytes
Jpg image
Jpg image
3179 bytes
   
8 color Gif image
8 color Gif image
879 bytes
Jpg image
Jpg image
3174 bytes


Gifs are not a good choice for photographs because of two main reasons
1). Photographs generally contain more than 256 colors.
2). Photographs are very complex images and the LZW algorithm is not able to do justice to the file size.

256 color Gif image
256 color Gif image
22234 bytes
Jpg image
Jpg image
9623 bytes

AddThis Social Bookmark Button
Page contents: Learn how to use Gifs correctly on web sites. For example, gif images are more suited for for flat color, line art or cartoon sort of images and not much for photographs.

Page URL: http://www.webdevelopersnotes.com/graphics/ when_to_use_gifs.php3



Join Mailing List


Feedback/Questions




50+ web hosting FAQs

Search engine for your website

Free software from Google - The Google Pack Collection

Create your own search engine
Search WebDevelopersNotes.com