|Introduction to Digital
by Frank Phillips
There is still a lot of confusion surrounding digital cameras and digital photography. With all the new cameras and options it just seems to get more confusing instead of clearer. It is easier to approach something if you can take it in small bites. So in an effort to make digital easier to approach and understand I've grouped together everything you need to know to get started in ten easy to understand lessons.
Lesson 6: File Size, Compression
When you press the shutter on your digital camera the image must be saved as a digital file. Your choice (or lack thereof) of file format helps to determine the size of the file and amount of compression applied to the image.
So what is compression? As its name implies the image data is squeezed down 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 a digital image.
It's best to think of compression like you do salt; a little can really improve the flavor, but too much ruin it. And like salt, once you've added too much compression there's no going back!
Understanding File Types
TIFF format produces large files. Most TIFF files are completely uncompressed and therefore are tremendous in size. The 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. Most cameras only save TIFF files at the "native" resolution of the image sensor. In other words if you have a 3.0 megapixel camera with a maximum resolution of 2048x1536 and you choose to save in TIFF format, that file will be 2048x1536.
JPEG (also abbreviated JPG) files are much smaller than TIFF files as they're compressed. JPEG gives you millions of colors, and because you control the amount of compression, you can also control the amount of distortion that the compression brings with it as well as the size of the image you're capturing. That same 3.0 megapixel camera might give you a choice in saving JPEG files at the following common resolutions: 2048x1536, 1600x1200, 1280x960 and 640x480. Why would you want to capture images at lower resolutions? One might be that you're going to put the images on a Web site where even 640x480 is more than large enough or maybe you intend to email the images where smaller file sizes are a plus.
But in addition to resolution, JPEG mode also allows you to control the amount of compression that's applied to the image. In most cameras the amount of compression is set using the "quality" setting on the camera's menu. Choices vary from camera to camera but they'll usually be along the lines of "fine", "standard" and "economy".
To understand how compression works, you'll need to think back to the previous lesson on resolution. An image is made up of many tiny squares called pixels. Each pixel has only one color assigned to it 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.
What's useless information? Imagine a photo of a red car. A TIFF file will record every pixel in the image of that red car. A JPEG file will record the first red pixel and then how many adjacent pixels are the nearly the same color red. Not having to record every pixel means you save a lot of space. How close the color can be and still be considered nearly the same color is determined by the amount of compression you choose (ex. fine, standard, economy).
RAW files are the largest of all. When you change the settings on your camera for things like sharpness, saturation or even the ISO setting you're telling the camera to change the image after it's captured - kind of like a mini version of Photoshop right inside your camera. In RAW mode the original unmodified image data is saved along with all the instructions you gave the camera through its settings. When you read a RAW file into Photoshop all those camera settings are applied to the image to make it look just as it did on your camera's LCD screen. The power of RAW mode is you can change those camera settings in your computer after the image is captured. A year later you can decide the image might have looked better if you'd used a different white balance setting and voila you can do it!
The price you pay for this flexibility is that RAW files are really big, even when compared to TIFF files. That means you'll be able to get fewer files on your memory card and fewer files on your hard drive.
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. The size of RAW files will vary from camera to camera.
As you can see, the more compression you apply, the smaller the file becomes, and there appears to be a point of diminishing returns. The file size reduction is the most dramatic between no compression and 10%, where the file size drops by 72% with very little visible reduction in "to-the-naked-eye" quality. Once increase compression to over 20% your image starts to "fall apart" and you're really not gaining much in terms of file size.
Just what happens to an image when we apply too much compression? The resulting image tends to block up with digital artifacts that are called "jaggies". This is especially evident in the comparison of the two photos below. Take a hard look at the edges and detail, and you'll see what I mean. You may also see visible bands of color in continuous tone areas such as blue skies. Those are the extremes. But with certain images you may see a loss of subtle tonal detail in shadow areas and in those same continuous tone areas.
So how much compression is just enough? That depends on what you're doing with the image. If you intend to use the image to create a wall size print you'll want to save it in TIFF or RAW format. That will give you every bit of information the camera captured to put into your print. But if you're just taking a snap shot that you'll be sending out in an email then go ahead and turn up the compression. You won't see the difference on the small screen and the smaller file size won't clog up the inbox of the recipient.
I personally save all of my JPEG files at 95%, and I would not recommend saving at less than 90% if you want to maintain photo quality. For Web images 80% to 85% works well.
Digital Media Cards Your camera can take one of several types of digital media (or memory cards). Your camera's manual will tell you what type or types of card your camera supports (some cameras can take more than one type). The smallest cards readily available today are 16mb. The largest are the monster 8 GB, yes eight gigabyte cards from Lexar. But those monster cards carry a monster price. That 8GB card currently retails for around $4,200.