|
|
Compression
Digital images are very large in uncompressed form. The combination of a minimum
of 24 bits (3 bytes) per pixel, and high pixel counts means that a single digital
image can be very large. A single uncompressed digital image from a 3.4 megapixel
camera is over 9 megabytes in size. This creates problems for camera vendors, similar
to the problem faced by creators of Internet sites such as this one. CompactFlash
cards, memory sticks, and SmartMedia are all expensive storage media - a 64 MB CompactFlash
card costs as much as a 30 GB hard disk, a 500x price difference per byte.
Very large uncompressed images require much more storage than compressed images.
The compression used by the camera is the same one commonly used on the Internet,
one developed by the Joint Photography Experts Group (JPEG).
Not surprisingly, these images are called JPEG images.; JPEG is called "lossy"
compression because some image quality is lost during the compression process.
JPEG is modifiable, it lets you trade off between an image very close to the original
and a much smaller one. The Nikon 990 (and a number of other digital cameras)
give you four options: uncompressed (the 9.4 MB image in TIFF format), fine, normal,
and small. A fine image is very close to the original in quality, and is usually
about 1.1 MB in size. This JPEG compression is a fairly sophisticated computation,
so a digital camera does a lot of work to save an image.
Digital cameras are computers, and a number of standards exist for computer images
in addition to JPEG. So why do digital cameras use JPEG? Is it the only
image format I need to use? If the answer to the second question was yes,
I would not be writing this paragraph. JPEG is a very good compression format
for representing complex images, such as photographs, because it retains 24 bit
color resolution (the 16,777,216 colors I talked about earlier), and a lot
of the complexity of the original image. Unless you really know what to look
for, it would be very hard to tell the difference between a high quality JPEG image
and an uncompressed image. There are two factors that determine the quality
of a digital photograph: resolution and color. The two are equally important,
although resolution is mentioned much more in advertisements (3.4 MegaPixels!!!)
than color. An 800x600 image with 24 bit color looks much more realistic than
a 1024x768 image with 256 colors.
The sole problem with JPEG is that the compressed image is not quite as good as
the original image. In order to make the image smaller, some detail is lost
forever. There are compression techniques that do not lose anything ("lossless"
compression) in the original image. They are used widely on the Internet for
computer graphics in the GIF file format. Techniques like GIF achieve their
savings in size through identifying clusters of pixels at the same location that
have the same color value. In order to get a GIF image of reasonable size
of this photograph you have to reduce the number of colors. This color reduction
is done to a digital palette of 256 colors. Detail in a photograph is irretrievably
lost with the color reduction. JPEG looks better for photographs, so it is
used in digital cameras because flash cards are expensive and the pictures look
pretty good.
If you are editing your pictures in a program like Photoshop, however, JPEG is not
such a good option as your sole format. If you are editing your images on
a computer, it is better to store your pictures in an uncompressed format such as
TIFF than JPEG. This is because every image editing program expands the compressed
file to make it uncompressed every time it is opened (it is easier to process uncompressed
images). When the picture is changed and saved, it goes through the compression
process again, irretrievably losing a little detail. After you are done with
your final edits, you can save it again as JPEG. If you edit and save the picture
several times, with compression at each stage, the loss in quality becomes quite
noticeable. In summary:
JPEG -> Good for storage
TIFF -> Good for editing
The other advantage to JPEG for storing images is that virtually any computer with
a color display can display your pictures. Virtually all Internet browsers
support JPEG images, so no changes are necessary to put images on the Internet.
It is also relatively easy for others to view your pictures if you send them copies
via email or on a disk or CD-R.
|