What are the differences between the GIF, JPEG, and PNG image formats?
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.
Also see:
- What do some of the graphics format file extensions stand for?
- For Mac OS and Mac OS X, what programs can I use to view and manipulate graphic and animation files?
- What is the GIF graphics file format?
- What is the JPEG graphics file format?
- What is the PNG graphics file format?
- What is the difference between an interlaced or progressively rendered image and a normal one?
- In Unix, what are the netpbm utilities and how do I use them to convert one type of image file to another?
Last modified on July 07, 2008.






