ARCHIVED: What are the differences between the GIF, JPEG, and PNG image formats?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

GIF is an image file format developed in 1987, using the LZW compression algorithm. Until 2004, LZW was patented in some countries; for more information, see the Unisys LZW web page.

JPEG uses a different compression formula; by averaging color variation and discarding information not accessible to the human eye, it can greatly reduce the file size of some image types.

Some image types are better suited to one format or the other. Specifically, PNG works best for geometric or line drawings, lettering, cartoons, and other images with flat color and sharp borders, such as computer screenshots. JPEG works best for storing full-color images full of complex shading and color variation.

PNG is mostly superior to GIF, as it is newer, supports more colors, and is free of patent restrictions. PNG cannot be used for animation, but offers highly sophisticated transparency and color support, among other features. In most cases where animation is not required, it is best to use PNG instead of GIF.

For a detailed description and comparison, see What is the difference between JPEG, GIF, and PNG? from the University of Surrey web page.

This is document afxz in the Knowledge Base.
Last modified on 2023-09-22 17:02:27.