- Check out the newest cameras on the market - Everything a Photographer needs
Articles Learn Books Sharing PRO Photo Terms Contact SiteMap News


Main / How to: About Compression

When you shoot a digital image, it must be saved in a digital file format, and your choice (or lack thereof) of that file format helps to determine the amount of compression that is applied to the image. What compression does, as its name implies, is to compress the data inside of the image so that its file size is smaller and thus takes up less disk space. Compression, when used correctly, is an extremely beneficial tool. However, when used improperly or overzealously, compression can literally destroy the quality of any digital image.

Name Your Brand: The most common digital image file types used today are JPEG, GIF, and TIFF. Every digital camera on the market today commonly stores images in JPG format, and some can also store the image in TIFF. From now on I'll focus only on JPEG files after a brief discussion of GIF and TIFF.

GIF is a commonly used image format on the internet simply because its limited color palette and tiny file sizes are compatible with web art and the "browser safe" color palette. Because GIF files are limited to only 256 colors, they are not good for digital photographs, which can contain millions of different colors. This is one extreme....tiny file size and limited colors.

TIFF is the other extreme. Most TIFF files are completely uncompressed and therefore are tremendous in file size. The real benefit of TIFF files in digital photography is that you are able to capture a full, undistorted image in all of its original glory before any compression is applied to the image. Later in this section you'll see a file size comparison between TIFF (uncompressed) and JPG (compressed) files.

JPEG is the best of both worlds between GIF and TIFF. You have millions of colors at your disposal, and because you control the amount of compression, you can also control the amount of distortion that the compression brings with it.

Workin' It: To explain how compression works, you'll need to think back to the previous lesson on resolution....specifically, that an image is made up of many tiny squares called pixels. Each pixel has only one color assigned to it, and in most cases this color is one out of a palette of over 16 million colors. In the case of a TIFF file, the color data for each and every single pixel is recorded, even if the same color appears over and over again.
In the case of JPEG compression, an algorithm is used to reduce the number of pixels that are recorded by simply removing the colors that the human eye doesn't see. JPG doesn't remove pixels (which would reduce resolution) but instead removes "useless" data and thus reduces the amount of information that must be saved in the file.
To see the difference in file size between TIFF and various levels of JPEG compression, I've compiled the following table from an uncompressed TIFF file I shot with a 2.1 megapixel Nikon.

As you can see, the more compression you apply, the smaller the file size becomes, and there appears to be a point of diminishing returns. The file size reduction is the most dramatic between 100% quality and 90% quality, where the file size drops by 72% with very little visible reduction in "to-the-naked-eye" quality. Once you drop below a quality factor of 80%, your image starts to "fall apart" and you're really not gaining anything in terms of file size.

Damage Control: Just what happens to an image when we apply compression? Compression of an image results in data being lost from the image permanently, so when your screen tries to rebuild that image without all of the data that was with the image originally, it has to "guess" at some of the missing data, and it's not always right. The result is what is often referred to "jaggies"...common blocky distortions that occur when excessive compression is applied. It should suffice to say that compression is like salt...a little goes a long way. And just like salt, if you use too much it will literally ruin your product.

Conclusion: So now that you've gotten the semi-technical information, what does this mean in practical purposes for the digital snapshot photographer. It simply means that there are ways to keep very good image quality while still not filling up your PC's hard drive. I personally save all of my JPG files at 95%, and I would not recommend saving at less than 90% if you want to maintain photo quality.

Tutorial source: Digicam INFO

Copyright 2017 All Rights Reserved.
Back to