WebDevelopersNotes logo

home-icon Home / Graphics / When do I use GIFs?

When do I use GIFs?

When do I 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

Photographs should not be saved in the GIF file format for two main reasons

  • Photographs generally contain more than 256 colors.
  • 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

Sponsored Links

Your comments
Star icon IMPORTANT Have a question / problem? Click here to ask an expert.

Sponsored Links

Tips

How do I view a deleted web page?
Is there a way to view a deleted web page - one that is no longer available? Yes there is and the solution is quite simple. [more...]

Fact

The Commodore PET (Personal Electronic Transactor) was the first personal computer to be available off the shelf on retail stores. Another product from the company, the Commodore 64, is regarded as the largest selling computer of all time. Commodore International was founded by Jack Tramiel, a Polish-American businessman. Unfortunately, the company failed to maintain its initial success and filed for bankruptcy on 29th April 1994. [more...]

We use cookies to give you the best possible website experience. By using WebDevelopersNotes.com, you agree to our Privacy Policy