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.

Web designer vs. web developer

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

Gmail ran for more than 5 years with the beta tag. It was removed on the 7th of July 2009.Google had launched their free email service on 1st April 2004 with 1 GB storage space. This was 20 times more than what was being offered by the competition at that time. [more...]

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