Aug 3, 2012

f Comment

Comparing Image Graphics File Formats JPEG, GIF, PNG, ICO, TIFF, BMP so You Know When to use Which!

AmazonJPEG? GIF? PNG? What are they? How are they different from each other? When should I use each of these image types? In this tutorial we'll be answering all these questions!

To be specific once you finish reading this article you'll be able to answer the following questions:

1. I need transparency in my image. What image format should I use?
2. I took a screenshot of my desktop. What image type is the best?
3. I'd like to put a photo on my website. What image format yields the lowest file size?

Comparison of Common Image Formats
JPEG, GIF, PNG, ICO, TIFF, BMP are six of the most common formats for images and graphics. They each have their advantages and disadvantages. Some support many colors; others support only a few. Some require much less disk space to store than others. Here is a table that compares the critical aspects of each of them. 'Lossy' means the image is stored at a less quality level in order to reduce image file size. 'Lossless' means the image is stored with NO quality loss.

JPEG/JPGGIFPNGICOTIFF/TIFBMP
Short for..Joint Photographic Experts GroupGraphics Interchange FormatPortable Network GraphicsWindows iconTagged Image File FormatBitmap
Release DateSeptember 19921987October 1, 1996November, 19851986November, 1985
Browser Support (Major browsers include Google Chrome, Mozilla Firefox, Internet Explorer, Safari, Opera.)All Major BrowsersAll Major BrowsersAll Major BrowsersAll Major Browsers (only as favicon)Safari and Internet ExplorerAll Major Browsers
Number of Colors Supported16.7 million2562^48, or 2.81475e1416.7 million16.7 million16.7 million
Lossy or Lossless?LossyLosslessLosslessLosslessCan be lossless or lossy, but used exclusively as a lossless formatLossless
Support Animation?NoYesNoNoNoNo
Support Transparency?NoYesYesYesYesNo
Best Use ApplicationFor complex images such as a colorful photoWhen you need simple animation or when you need transparency in a single, simple imageFor simple images such as a desktop screenshotUse ICO only for favicons as ICO is the only format supported by all major browsers.Professional photos with no loss of detailsYou should never use BMP.

You should NEVER use TIFF or BMP for images that you display on a website! If you beg to differ let me know!
Conclusion
So here's the conclusion of when you need which image format.

When you need to store on your computer or a hard drive a professional photo where quality is a must, pick PNG or TIFF. Use Microsoft Paint to save the same photo in PNG and in TIFF separately to find out which format yields a smaller size. Based on my experience they yield equally big files.

When you need to display photos on your website then use JPG/JPEG. JPEG does an excellent job of reducing file size at a small expense of the image quality, and the loss in quality is mostly imperceptible to our eyes anyway.

When you need transparency in a simple image use GIF. GIF yields a much lower file size. I've tested storing a 100 pixel by 100 pixel image and a 500 pixel by 500 pixel image as GIF versus as PNG and the savings in size when stored as GIF go from 12% to 35%! HOWEVER keep in mind a GIF image only supports up to 256 colors!

When you need transparency in a not-so-simple image use PNG. Basically if your image contains more than 256 colors then it is considered not-so-simple.

When you need to play a simple animation go with GIF. Note each frame of the animation should not contain more than 256 colors.

What if you need a complicated animation? Then use Adobe Flash!
When you need to store a simple image or an image with several colors in it go with PNG. My experience suggests a screenshot of your desktop fits in this category. When in doubt you can also use Microsoft Paint to find out whether PNG or JPEG yields a lower file size.

You should use ICO when you are creating 16x16 favicons for your websites.

Again you should NEVER use BMP.

So here's a test for you. What image type should you use to save a complex photo with some areas of transparency in the photo?

The answer is PNG.

If you have any questions let me know and I will do my best to help you!
Please leave a comment here!
One Minute Information - by Michael Wen
ADVERTISING WITH US - Direct your advertising requests to Michael