Digital Camera Guide-Image Compression
When taking pictures, there are a number of choices you can make about such things as image sizes, compression ratios, and file formats. Your choices determine image quality and the size of the files you create.
When you take a photograph, the size of the image file is huge compared to many other types of computer files since each pixel requires 24 bits (3 bytes) to store color information. As the resolution increases, so does the file size. A file for a low-resolution 1 megapixel image is 3 megabytes, and at 3 megapixels is climbs to 9 megabytes, and at 6 megapixels all the way to 18 megabytes. The files become too large to easily store, transmit, and edit. To make image files smaller and more manageable, digital cameras use a process called compression. Compressing images not only let’s you save more images on a camera’s storage device, it also allows you to download, display, edit, and transmit them more quickly.
During compression, data that is duplicated or that has no value is eliminated or saved in a shorter form, greatly reducing a file’s size. For example, if large areas of the sky are the same shade of blue, only the value for one pixel needs to be saved along with the locations of the other pixels with the same color. When the image is then edited or displayed, the compression process is reversed.
There are two forms of compression—lossless and lossy—and digital cameras use both forms.
Lossless compression. Lossless compression uncompresses an image so its quality matches the original source—nothing is lost. Although lossless compression sounds ideal, it doesn’t provide much compression and files remain quite large. For this reason, lossless compression is used mainly where detail is extremely important, as it is when planning to make large prints. Lossless compression is offered by some digital cameras in the form of TIFF and RAW file formats.
Lossy compression. Because lossless compression isn’t practical in many cases, all popular digital cameras offer a lossy compression (rhymes with “bossy“). This process degrades images to some degree and the more they’re compressed, the more degraded they become. In many situations, such as posting images on the Web or making small to medium sized prints, the image degradation isn’t obvious. However, if you enlarge an image enough, it will show.
You have a number of choices when it comes to file formats. All digital cameras store still images in the JPEG format, but some also let you select TIFF and/or CCD RAW. Let’s look at all three formats.
JPEG, named after the Joint Photographic Experts Group and pronounced “jay-peg,” is by far the most popular format for photographic images. In fact, most cameras save their images in this format unless you specify otherwise.
A JPEG image is stored using lossy compression and you can vary the amount of compression. This allows you to choose between lower compression and higher image quality or greater compression and poorer quality. The only reason to choose higher compression is because it creates smaller file so you can store more images, and it’s easier to send them by e-mail, or post them on the Web. Most cameras give you two or three choices equivalent to good, better, best although the names vary.
JPEG compression is performed on blocks of pixels eight on a side. You can see these blocks when you use the highest levels of compression or greatly enlarge the image.
JPEG 2000 is a new version of JPEG that has not yet been widely implemented. This is not a minor revision, it’s as if they jacked up the JPEG name and rolled an entire new file format under it. It uses wavelet compression instead of the old Discrete Cosine Transformation (DCT) to give a higher compression (20% better) and better image quality with fewer artifacts (image flaws). Wavelet technology also allows an image to be “streamed.” A low resolution image appears quickly and then is gradually “filled in” with more detail. As a user, you can decide when you have enough resolution for your purposes. This is referred to as “level of interest access.” You can also save an image in a new lossless JPEG format without having to save it in a lossless format such as TIFF. The older JPEG format has no provision for how colors are displayed so images look different on different systems. JPEG 2000 includes what’s called color management, so image colors are rendered more accurately.
TIFF (Tag Image File Format) has been widely accepted and widely supported as an image format. Some cameras let you save your images in this format and because of its popularity in digital photography, the format has been revised to TIFF/EP (Tag Image File Format—Electronic Photography). TIFF/EP may be stored by the camera in uncompressed form, or using JPEG compression. TIFF/EP image files are often stored in a “read-only” fashion to prevent accidental loss of important information contained within the file. This is why you sometimes can’t delete them once they are on your computer without first turning off the file’s read-only attribute.
CCD RAW format stores the data directly from the image sensor without first processing it. This data contains everything captured by the camera. In addition to the digitized raw sensor data, the RAW format also records color and other information that is applied during processing to enhance color accuracy and other aspects of image quality.
Instead of being processed in the camera, where computing power and work space is limited (imagine Scarlet O’Hara trying to change into a Civil War era ball gown in a small closet), the raw data can be processed into a final image on a powerful desktop computer. The increased computing power and space to work in can make a significant difference in the results. You don’t get the artifacts (image flaws) that sometimes appear in JPEG images. In addition, you can save the original raw data and process it with other software, or in different ways. This is unlike a JPEG image where data are permanently changed or deleted during processing in the camera and can never be recovered.
In addition to image quality, RAW files have other advantages. Their files are approximately 60% smaller than uncompressed TIFF files with the same number of pixels and the time you have to wait between shots is shorter since processing time in the camera is shorter.
PNG (Portable Network Graphics and pronounced “ping”) is a lossless format designed to replace GIF, an image format that got tied up in legal claims. It is a universal format that is recognized by the World Wide Web consortium, and supported by all recent web browsers. Here is how PNG differs from the other widely used digital image formats.
TIFF is a popular format because it uses a lossless compression. The problem is that the format has been altered by so many people that there are now 50 or more flavors and not all are recognizable by programs.
JPEG uses lossy compression so images loose quality each timed they are saved, closed, and then reopened. PNG images are lossless so retain their quality. Because their compression is lossy, JPEG images are usually smaller. For that reason, although PNG is a good intermediate format because it’s lossless, you may want to convert to the smaller JPEG format before e-mailing or posting on the Web.
If your camera lets you choose an image format or compression ratio you should always choose those that give you the highest quality. If you decide later that you can use a smaller image or greater compression, you can do so to a copy of the image using a photo-editing program. If you shoot the image at a lower quality setting, you can never really improve it much or get a large, sharp print if you want one. The only problem with this approach, and it’s a big one, has to do with file sizes. The highest quality images can be 15 or more megabytes in size. These are almost impossible to send to anyone and are slow to open, edit, and save on even a powerful desktop computer. In fact, when you shoot images of this quality you often have to wait a long time between shots because the camera is tied up processing the last image you took. Most photographers use a compromise and shoot in the highest quality JPEG format. Even these image files can be 2–5 megabytes in size on the latest cameras.
When you open an image to work on it, you should first save it so you are working on a copy, preserving an unchanged original. Save it in a loss-free format such as TIFF. Even better, your photo-editing program may have its own native format that preserves information that no other format will. If you want a specific format for the finished image, save it in that format as the final step. In particular, don’t repeatedly close, open, and resave JPEG original images. Every time you open one of these files, and then save it again, the image is compressed. As you go through a series of saves and reopens, the image becomes more and more degraded—an image quality death spiral. (An image is compressed only once during a single session, no matter how many times you save it.) Also, when you save an image as a JPEG, the image on the screen won’t reflect the compression unless you close the file and then open the saved version.
Many digital photos end up on the Web or attached to e-mail, so they are viewed on the screen. For these purposes, small, heavily compressed files that are easy to view or send over the Internet are favored. The leading format for images used in these ways is JPEG. For the highest quality printed images, TIFF or RAW formats should be used.


















it has all the features which any camera required. Great