new_banner.gif (4081 bytes)

Go to Travelog.net Home Page
Go to Travels: the heart of Travelog.net; stories from around the world
Go to On Travel: tips, hints and stories about travel
Go to Technology: How Travelog.net is produced on the road; real-time web publishing; digital photography
Go to Photography: Travelog.net photo gallery
Go to Links: links on backpack & budget travel
Go to About Travelog.net: who what and why Travelog.net came about

E-mail me!  I love to hear from people who have dropped by the site!

Using the Kodak DCS-120 for Web Publishing: Comparing Picture Quality Settings and JPEG Image Compression

I am currently engaged in a personal experiment in real-time web publishing. I a traveling around the world and publishing a travelogue in real time. I use the Kodak DCS-120 digital camera with a 10 MB Picture Card to capture images for the web pages.

I have been delighted with the quality of the pictures the DCS-120 takes. I have a Nikon F5 camera and a Nikon LS-20 CoolScan slide scanner and still can't make them produce an image of the same quality for the web--not easily anyway. The DCS-120 does have it's shortcomings; it is just a "point-and-shoot" camera with little creative control, however, with a little imagination I have been able to push it to some surprising limits. I love my Kodak DCS-120.

I had been shooting all my pictures in the Best picture quality mode, which generated images that were of excellent quality for my purposes. The problem was, if I was shooting a lot of pictures, I would run out of space on my 10 MB card. It holds 38 pictures in Best picture quality mode, one roll of film, not enough for a day's shooting if it's an exciting place or event.

So I started wondering, what picture quality setting would be good enough? I decided to take some test images and compare the results to see what setting I really needed. If I could use a lower setting and get good enough images, I could take more pictures before I ran out of memory. I wanted to get the most out of my camera. The results were pretty much as I expected. One discovery surprised me. The experiment did help me use the camera better. So I experimented and here's what I found.

Life is to complicated: give me the simple answer...

A Quick Overview of Image Compression and It's Effects

In a perfect world we would have a digital camera that could take an infinite amount of perfect pictures that took up no memory storage space and the images could be transferred to tiny files that would produce crystal-clear images for publishing on the web. (Are ya' listening Kodak?)

We don't live in a perfect world. Digital images contain a lot of information and therefore take up a lot of memory storage space. There are tricks--compression methods--that can reduce the file sizes, but at a cost: they remove some of the information in the image. The image quality degrades. Hopefully, if the compression is done well, we can keep the image quality high with little or no visible degradation.

When we use a digital camera to take pictures for the web, we wind up compressing the image twice: once when we store the image in the camera and again when we prepare the image for publishing to the web.

The first time the image is compressed is when the Kodak DCS-120 stores it in the camera memory. Compression is done automatically based on the Picture Quality setting of the camera. The DCS-120 has four Picture Quality modes: Good, Better, Best and Uncompressed, which correspond to the amount of compression the image is subject to before it is stored in the camera's memory. The better the quality of the picture, the more memory the image takes, and the fewer images you can store before the camera's memory is filled. (Images the DCS-120 memory can hold: built-in camera memory: 20 Good, 12 Better, 7 Best, and 2 Uncompressed; with a 10MB Picture Card: 103 Good, 66 Better, 38 Best and 11Uncompressed.)

The second time the image is compressed is when we edit save it in a format for web publishing. Once you open up an image for editing or re-saving you have and uncompressed image. You have to recompress it for publishing on the web--if you don't compress the images, the people viewing your site will be waiting all day for pages to download. That's why most images on the web are in a compressed format. The most common format for pictures is JPEG, that's what I use and that's what I will limit the discussion to for simplicity and practicality.

JPEG compression does an excellent job compressing images. A "high quality" JPEG compression setting (some programs use percentages, high would correspond to 90%) will typically reduce an image's file size (and therefore download time) to one tenth the uncompressed images file size without any visible changes. Medium quality (75%) is still one third smaller than that and shows some image degradation (often referred to as "compression artifacts" or simply "artifacts"). Low quality (50%) is half the size of a high quality JPEG image, but the artifacts become severe and, in my opinion, aesthetically unpleasant.


High Quality JPEG Compression, 23K (DCS-120)

Low Quality JPEG Compression, 11K (DCS-120)

Look closely at the two examples above. The original image is 226K. The low quality JPEG image (right) has patchy blue sky, the details in the foreground are lost (look closely at the buildings and trees) and there is significant "crud" that appears around the phone line and the building on the right--all JPEG compression artifacts. (See below for links to more comparisons.)

Note: if you aren't careful you can easily make matters worse by repeatedly editing and saving a file in a compressed format; each time you re-save the file, you re-compress it, multiplying the damage done. Save an uncompressed version (.tif or .bmp for example) and use those for editing--then save the final image as JPEG.

OK, so we have discussed the tradeoffs between image size and quality. So what does that mean in the real world?

So What Combination of Picture Quality and JPEG settings Should I Use for Web Publishing?

That's where my experiments come in. I took a series of images at different camera settings and compared them to see what effects the setting would have. I expected one or two combinations of setting would be the obvious choice. That didn't happen. Life is always more complicated than we want it to be.

What I found was that the better the original Picture Quality setting the better the final image. I had expected that at some point the reduction in image size and effects of the JPEG compression would negate the effects of the camera setting. It didn't. Even when the images were reduced to 320x240 pixels and at 75% JPEG compression, there was a small but noticeable difference.

One unexpected result I discovered: the camera Picture Quality setting affected the final file size of the processed and compressed image. The better the Picture Quality setting, the smaller the resulting final image. After I thought a second, it made sense. Contrast (such as noise) in a JPEG image works against the compression algorithm. The first compression (inside the DCS-120) generates noisy artifacts in the image and that makes it harder for the second compression algorithm, JPEG, to efficiently compress the image.

The difference in file size was significant. Compare two files, both 320x240 pixels, both JPEG compressed 75%. The resulting file size was 16K for an Uncompressed Picture Quality image and 19K for a Good Picture Quality image, a 3K or 20% difference in file size. This increased file size means it will take 20% longer to download each image. It also means a 20% higher burden on the server—which can have a dramatic effect on a high traffic web site with a lot of DCS-120 images.

So, for the best quality and the smallest file size, shoot your pictures at the highest Picture Quality that you can. Of course you must take into account the number of pictures you can fit in your camera's memory. If you need to take 50 pictures before you can download, you won't be able to use the Uncompressed setting.

JPEG settings really determine the final file size. So pick the JPEG setting that give you the smallest file size with and image quality that you can live with.

Keep your surfers in mind. Maybe your standards won't allow you to live with a low quality image, but do you want to inflict a long download on your user because you are being a perfectionist? At the other end of the spectrum, don't pat yourself on the back for getting a file down to 1K if the image quality is so bad that you can't tell if it was a picture of your girlfriend or an cubist painting.

The Simple Answer

If the questions is "John, what do you think is good enough?" then I have a simple answer.

If I am embedded images in text, I think 320x240 images work fine, I have even started using 240x180 images to reduce the file sizes and page download time. I usually use the Better Picture Quality setting (sometimes I use Best if I am not shooting many pictures) and save as medium quality (75%) JPEG. That results in a 13-19K image (10 to 14K for 240x180) of decent quality. To keep page downloads quick, I try to limit the number of pictures per page to four or less--preferably less.

If I want to use larger images, say 640x480 for "full page" graphics, I stick to a higher Picture Quality setting. I think Best works fine, then I save as medium quality (75%) JPEG. That gives me a rather large file at around 50K. Out of deference to my readers, I use large images very sparingly or embed a thumbnail and let them click if they would like to see the larger version.

Also note that the Picture Quality setting does affect the final image; the higher the Picture Quality setting, the better the final image and the smaller the resulting file size. Shoot at the highest Picture Quality that you can.

Note: you can change the Picture Quality setting on a picture-by-picture basis. If you know you have a picture that you will display in a large size or where you will want to show detail, change the setting to Best or Uncompressed for that picture, then switch back  to Better for regular shooting.

Below are sample images you can look at yourself to see the effects of Picture Quality and JPEG compression settings. Be your own judge.

Compression Samples
  1. Sample 1: 320x240 (warning: very large page, many graphics, long download) I made a matrix of sixteen images, Picture Quality setting vs. JPEG compression, to illustrate how each of the two variables affect the end image.
  2. Sample 2: 640x480 (warning: very large page, many graphics, long download) An illustration of how Picture Quality setting and JPEG compression affects larger images. (coming soon...)

 

Last updated: Friday, July 24, 1998 05:21 PM


Need interesting content for your travel related web site?  Click here!

[Home] [Travels] [On Travel] [Technology] [Photography] [Travel Links] [About Travelog.net]

E-mail me at jberns@johnberns.com.

A Request:
I have re-designed the whole site to (theoretically) improve ease of viewing in all major web browsers and to make individual pages easier to link to.  If you encounter any problems, let me know what the problem is and what browser you are using (for example, "Internet Explorer 3.0 for Windows 95," "Nestscape Communicator 4.0 for Macintosh," or "I don't have a clue, this is my girlfriend's computer" and I will try to fix it.

All text, photographs and material contained on this web site ©1998, John F.X. Berns. All rights reserved.

This server hosted by Forward Communications

Web server hosting has graciously been provided by Forward Communications, Chicago, Illinois.