One of the problems of digital photography is the ability to pack a lot of detail into our images. But in order to do so, we will need files that contain lots of data carrying pixels to convey all that detail. As a result, digital images have a tendency of being very big. And if you wish to pack more detail into them by adding more pixels, they can actually be huge files; so huge that they present a very serious problem with storing and managing them. Further complicating matters, digital pictures are often taken in locations where no computer can go. The digital camera has to be a self contained system for capturing and storing potentially huge digital files. Notice the plural; for a digital camera capable of only taking one picture, where you have to return to a computer and upload the picture before you can take another, is very impractical.

The problem simply requires some sort of system where images can be compressed allowing for taking more pictures in the field. Many manufacturers of digital cameras have turned to the already existing JPEG compression technology, about as good a technical solution as is probably available today. The results are files that are noticeably smaller, taking up less room and allowing for more pictures in the field. For the photographer, this means less of an investment in storage memory and the opportunity of experimenting more in the field.

But there is a tradeoff. JPEG is classified as a "lossy" compression scheme which means that some data is intentionally mathematically calculated out of existence to achieve smaller file size. The smaller the file, the greater the loss in detail. As observed on the Sony FD-91, the image is divided into what we will call "supercells" of eight by eight pixels. Then each is mathematically treated to produce a representation of this area with less data. The problem is that the very next supercell, which normally should transition smoothly, can actually be significantly different. In its worst form, it is possible to zoom in on the image and actually see the boundaries of the supercells. Why we even see the boundaries is the problem for these boundaries, often called "artifacts", now become part of the picture and may be visible at normal viewing.

The trick to using JPEG is to determine just how much image loss you are willing to sacrifice to achieve smaller files. If you were using JPEG for scanning images to your computer, the issue would not be that serious for you could scan uncompressed for the highest quality. Why not? Your computer is right there and you should have more than enough memory and storage to handle the image. Process the uncompressed picture in Photoshop and then save the finished picture with JPEG compression. Further, you might even work on only one picture at a time before compressing and scanning another picture. There is no backlog of images as there is with digital photography. All pictures of a session must be stored before processing so multiply the size of one image by the total number of pictures you would like to take and you will have a better perspective of the storage problem and the need for compression.

And it is here that you have to make critical decisions. Since the camera, set to a JPEG compression setting, will automatically introduce artifacts into our images, you must determine the amount of damage you are willing to tolerate. Realize also that Photoshop and other image manipulating programs will further corrupt the picture because they will be processing the artifacts along with the image details. Photoshop cannot tell the difference between artifacts and detail. Of course, the worst concept to realize is that the JPEG compression is introducing irreversible damage. Once the artifacts are calculated into the picture it is permanently changed. Your only question to ask is, "Does it matter?" And this is a subjective question to which only you can answer. Finally, when you exit Photoshop you will save the image again and this may introduce more artifacts because you may now be compressing the original compressed files. No, it won't get smaller, but JPEG will treat the original artifacts as data and use them in calculating a new compression. Done enough times, the results will be very noticeable.

In this article we look at some images close up and also at full size and determine just how much damage there is. Our camera is the Sony FD-91 and is used here as a control device comparing the two different levels of JPEG compression and the BMP uncompressed setting available for this camera. It is not intended as an endorsement or condemnation of this camera, it is merely representative. Generalized results by repeating the experiment with other cameras will probably result in the same research conclusions but actual pixel by pixel comparisons will probably be different. They will instead show differences between CCD sensitivity and post-exposure processing.

 

 

 

The damage

We begin by looking at three roughly identical pictures at 640 x 480 resolution. One taken in BMP uncompressed format (no compression but large files) and two others with JPEG compression, Standard (lower quality and smaller file) and Fine (higher quality and larger file). These are the three options available on the FD-91.

 

Above is a small cropped portion of our image set to Standard, the lowest quality setting. The file size of the entire image is 51,830. Above is about the same area set to Fine, the better JPEG compression setting. Here the file size for the entire picture is 92,233. Above, the camera is set to BMP producing an uncompressed 640 x 480 image that measures 921,654 bytes.

 

 

The screen captures above were all taken at 1:1 size eliminating any interpolation that may be caused by the computer reformatting the screen image to a particular view. The results should be what the viewer of the web graphic would see. No other modifications to the original files were made. Stare carefully and look for artifacts and other damage. Hard to see, No? Well, this is the concept of JPEG compression and why it was developed. Most artifact damage is below the resolution of your eye so, in theory, you can't see it.

But there are some differences that are slight and may very well make all the difference in the world. Just because you cannot see the damage doesn't mean there isn't any. By the way, each of the three illustrations above are saved with JPEG compression so the results aren't actually perfect representations. If you download them for study, you may see JPEG artifacts that were not on the original uncompressed files. Further, you may see additional artifacts on the two compressed files because they are now compressed twice!

Below, we see magnified views of each of the three original images. Again, the screen captures were at 1:1 but the view was magnified to 4:1 in Photoshop.

 

 

Above is a close up of the Standard compression setting. This is the lowest quality that the FD-91 gives us and we can clearly see the supercell boundaries. This is the greatest problem with JPEG is this averaging into supercells of eight by eight pixels. On the lower left is a supercell that cuts into the natural edge of the wood. On the upper right the texture of the rock changes abruptly as a straight vertical line as adjoining supercells are processed radically different.

 

 

Above is the same approximate area of the Fine compression setting. This results in a file size that is almost twice as large but contains a lot less obvious supercell borders. The edge of the board is more accurately defined and so is the transition between the texture on the upper right. Furthermore, the supercells are not clearly defined in the center. The result shows that this compression level is far superior to the Standard setting shown above.

 

 

For the best this camera has to offer we look at the uncompressed BMP version above (note that the illustration above is compressed in order to create this illustration!). The camera saves the image in the BMP format which can easily opened by Photoshop and other programs for correction and modification. Then, at the end of the adjustment and correction process, save the image in JPEG format only once as intended by the developers of JPEG. As you work, there will be no additional damage caused by compressing artifacts because there were none in the first place.

Now look closely at the above image. There is no JPEG damage but if you were expecting an absolutely fantastic image you were probably disappointed. This is what you get with 640 x 480 resolution with this camera. Although you can take compressed 1024 x 768 images, 640 x 480 is the highest uncompressed setting available because an uncompressed 1024 x 768 image will not fit on a 1.4MB floppy disk! Cameras that use memory cards could store higher resolution uncompressed files.

 

 

 

Sharpening the images

We could leave the experiment here, for we are finished. But one of the most serious problem is that if you bring an already JPEG compressed image into Photoshop, the commands will also process artifacts and other damage such as the edge lines of supercells. If your adjustments are minor, it may make little difference. But if image quality is critical, uncompressed may be the only choice. In the examples below we add 300% Unsharp Mask (.3 Radius and 0 Threshold) to each of the images and then make a screen view of the same area as we showed above. The overall images are noticeably oversharpened, but our objective is to show the effect of sharpening JPEG compression damage.

 

Above, the Standard version is sharpened and each of the supercells stand out more as a result. Not very good! This could limit the amount of sharpening you may be able to apply. Above, even though the original Fine JPEG damage is not that noticeable, sharpening exaggerates the damage and we can clearly see the supercells where in the unsharpened version (large view above) we have a hard time detecting them. Above, the uncompressed version tolerates this amount of sharpening. Notice the overshapening on the bottom edge of the board. This problem occurs because the Sony has a tendency of oversharpening the images within the camera. Something different, this is not the result of any JPEG damage.

 

Above, we see that our control over Photoshop adjustments are affected by the amount of JPEG compression artifacts and damage found in the original camera image. The main problem is that no program, including Photoshop, can distinguish between fine picture detail and artifacts and damage. In fact, such damage as oversharpening, a serious problem with Sony cameras (and camcorders) will limit the amount of post-exposure work you can do. In the case of the Standard version, at 500% Unsharp Mask, the image showed supercell walls at normal viewing size!

 

 

 

Conclusion: Living with JPEG

So what's the answer? From the above we can clearly see that JPEG compression introduces damage into our pictures in the form of artifacts and supercell edges. But do we really notice the damage? Does it really make a difference? When you consider the argument of storage vs. quality the answers are always practical and highly subjective. And, of course, you are not the only person making that judgment. You must consider your viewer and what they may be willing to tolerate, your customer and what they are willing to pay for and any future needs you might make of the image such as editing, compositing or even recycling the photo into another project. Each and every picture will have to be evaluated as you work for only you know the end use of the image and how critical fine details are for a given project. There are going to be images where JPEG artifacts could ruin the image and there are others where it will probably make little difference.

But the problem does require a simple answer on your part and that is the final analysis. The compression level you select may well depend on the use of the images. If they are simple test images, higher compression may be tolerable. If you are photographically exploring a subject just to show a customer what you can do, more compression may be tolerable. Just learning to use your camera and want to explore the settings and adjustments? The highest compression may do allowing you the greatest amount of images in the field. But if you are on that once-in-a-lifetime vacation, choosing too low of a compression quality setting may result in an entire batch of disappointing images. The same holds true for images you know you will spend a lot of time in Photoshop with. You may not want to afford start processing with images full of artifacts and damage.

The JPEG compression argument will always be with us until a better scheme is developed and implemented (can your present equipment be upgraded?). When you buy your camera you should study the compression settings and even, if possible, study sample images. But in all, living with JPEG is much easier once you understand the nature of the argument and can develop techniques and strategies for living within the limitations.

 

 

 

 

Virtual Graphic Artist Webzine
Copyright 2000, R.P.Duzniewski, all rights reserved. No portion of this page or site may be reproduced without permission.
www.deluxacademy.com
dtp@deluxacademy.com