Home Friends Guess What? Links Gallery Writings and Experiments Digital Photography ChickadeesMy Other Web Site
Casio Wrist Camera Photos
Chickadees
.
| |
The dilemma: "Should I take a lower quality, larger image, or
a higher quality, smaller image?" That is the question facing
photographers who want to fit more images into their camera's memory
card. This dilemma is shared by those who want to minimize image
storage, and need to choose between saving a smaller image and saving a
compressed one.
First some terminology.
The term compression, as used here, refers to JPEG
compression, a mathematical process that reduces the size of an image by
sacrificing image detail. More compression means a smaller file,
but less quality.
Most digital camera manufacturers designate the amount of
compression with terms such as "Basic",
"Normal", and "Fine". Image editing programs
generally use a numeric designation, with higher numbers indicating more
quality, and less reduction in final file size. I will use the
rather long-winded phrase JPEG
compression quality setting to mean the level of compression applied
to an image.
The process of making an image larger or smaller is called re-sizing.
Software uses a mathematical process called re-sampling
to calculate new pixel values whose spacing is larger
or smaller than the original pixel values, very much like changing the
size of a drawing on a balloon by inflating or deflating the
balloon. The end result is a larger or smaller image, and so a
larger or smaller file.
-----
First, let's look at the dilemma of the storage-starved
image editor who wants to decide whether to reduce the pixel dimensions
of an image, or save a larger version of the image at a lower JPEG
compression quality setting.
The following
images represent two different ways to get a smaller image: reducing the Compress or Resize-and resizing. These are sub-sections of images, with the
resized image magnified to cover the same relative area of the
image.
-----
|
| The
image to the right is a close-up of a butterfly. It was
saved using an image editor at the lowest possible JPEG compression
quality setting.
Click on the image and be stunned
by the amount of detail possible in a relatively small, 192 Kbyte, image.
Note: Explorer has a pesky
"zoom to fit" option. If after clicking on the image
to the right you see anything less than a very large image,
move the mouse over the image. In a second you'll see
an orange "zoom" icon in the bottom right corner of
the image. Click on it for a major experience in large-image
pixel-mania.
Although the sharp details
look good, jpeg does some slight of hand for areas of subtle
gradation: can you spot the jpeg artrifacting in the center
of the butterfly's body?
|
 |
| These are
cropped images. Click on either
image to view or download the entire image. |
This is an enlarged
section of an image created by resizing the original 3 megapixel image from 2048x1536 to 278x209pixels,
for a final image size of 192 Kbytes. This is slightly larger than
the compressed file above. This is a small
section of that image, magnified horribly for comparison with the same section of
image from the compressed file above. Click
on the image to view it at its actual, and rather tiny, size.
You may also download TIFF
or PNG versions of this image. Though these
are lossless formats, each comes with a price: you
will need a TIFF compatible viewer to see this image directly (Irfanview
is one of the best freeware image viewers for Windows). PNG is not
supported by all browsers, though it works fine with Internet Explorer
and Netscape.
|
 |
|
The Compression Theorum: if file sizes are
equal, the more highly compressed image has superior image
quality.
So it is better to compress more than it is to settle for a smaller
image. If you are editing an image, you are in a position to specify the
image quality over a very large range. Likewise, a mixed strategy
of resizing and compressing is a probably less effective use of storage
space than simply compressing the original image at a lower JPEG
compression quality
setting.
"Well and good", you may say, "for
image editing software situations, where I have control over image size
and JPEG compression quality, but a camera is different". And
right you would be indeed.
-----
A digital camera, sadly, offers only
a few image size and JPEG compression quality settings, so it is not possible to finely
adjust the JPEG quality. This means the file sizes of two different
compression and resolution settings will probably never be exactly
equal. So the photographer who wants to fit more images on a card is
faced with a trade-off, juggling image size versus JPEG compression quality but lacking
fine control of either. As we will see, the manufacturer can
sometimes fumble the ball as well.
Here is a "compression test" done with a
Nikon 990, a 3 megapixel camera.

full frame
|
JPEG
Compression Quality |
Image
Dimensions
(pixels) |
TIFF
/
Uncompressed |
Fine |
Normal |
Basic
/
Economy |
| 2048
X 1536 |
file size =
9,550,153 bytes

no compression |
995,439 bytes

10 : 1 compression |
675,257 bytes

14 : 1 |
385,531 bytes

24:1 |
| 1024
x 768 |
n/a |
292,102 bytes

8 : 1 |
165,042 bytes

14 : 1 |
107,875 bytes

22 : 1 |
| 640
x 480 |
n/a |
12121,457
bytes

8 : 1 |
75,000 bytes

12 : 1 |
52,315 bytes

18 : 1 |
| 2048
x 1360 |
8,468,809 bytes
8,468,809 bytes
1 : 1 |
887,756 bytes
10 : 1 |
577,317 bytes
15 : 1 |
342,556 bytes
25:1 |
Looking at the chart, a full-size fine image is
just under a megabyte, and is compressed at a ten to one
ratio.
Knowing what we know about compression versus file
size, how should a photographer "hop scotch" his or her way to
the optimal image size?
Note that the most significant image change
occurs between rows, as resolution decreases, even though the relative
file size is changing less. A drop in resolution degrades the
appearance of an image more, in proportion to file size, than a change in
JPEG compression quality. If we could drop the jpeg quality
compression setting even more, we could get the benefits of smaller file size without having
to drop resolution and sacrifice image clarity.
Conclusion: decrease
JPEG compression quality without a qualm, but kick and scream a little
before you drop the resolution.
Ignoring the bottom row for the moment, the camera
manufacturer has carefully set things up so that stepping down the chart
from the left to right and down results in progressively smaller file
sizes, and similarly lower quality. There is one exception to this
pattern, and I have highlighted it in green. A VGA fine image
is larger than a 1024 x 768 basic image, yet the image quality, as
can be seen from the sample is worse. I would not recommend using
the VGA setting for this reason, and consider it a mistake on the part of
the manufacturer to provide this option at all.
Conclusion:
Manufacturers make mistakes. A larger file will usually capture a
better image than a smaller one, but don't count on it.
BTW - The bottom row of this chart, which appears in
italics, was
created using the camera's 3:2 ratio mode. This setting is designed
to exactly fit the aspect ratio of a 4x6 inch snapshot, avoiding waste and
providing accurate in-camera control over the framing of images destined
to be printed at that size ratio. If you are going to print at this
size, and don't want the option of cropping, it's a no-brainer to use this
image size setting, since the extra pixels will not be printed, and you
will be able to fit 10 percent more images on each memory card.
-----
As always, I encourage you to
try the experiments outlined here for yourself - if you find any
interesting results, such as glitches in the compression scheme of other
cameras, or
if you have any questions or suggestions for improving this web page,
your email
is appreciated.
Thanks in particular to Bernard Hill (http://www.braeburn.co.uk/jp.htm),
whose suggestions for this article were invaluable.
Mike Russell, June 12, 2002
|
|