How Digital Photography Works

(singke) #1

CHAPTER 7 HOW LIGHT BECOMES DATA^113


Software, in a camera or computer, that compresses a file in the JPEG
format examines the file for pixels whose absence is unlikely to be noticed
by the uncritical human eye. More accurately, it’s not their absence that’s
overlooked—it’s the fact they’ve been disguised to look like neighboring
pixels. If half of the area of a landscape photograph is devoted to a cloud-
less sky, saving the color values of each of the pixels making up the sky is
an extravagance when many of the pixels are exactly the same shade and
intensity of blue.

4


Rather than recording the 24 bits needed to describe each pixel, the com-
pression software records the bits for only one—the reference pixel—
and then writes a list of the locations of every pixel that is the same color.

5
For more drastic compression, another trick
is to divide an image into 8-by-8 pixel
blocks and calculate the average color
among the 64 pixels in that block. If none of
the pixels are too different from the aver-
age, the compression changes the colors of
all the pixels to the average, and your eye is
none the wiser.

6


A problem with JPEG compression has been
that a photo is recompressed—with more
original pixels thrown away—each time it is
resaved to the JPEG format. If it’s saved too
many times, you increase the appearance of
unnaturalbanding—obvious strips of color
instead of smooth gradations as you see, for
example, in the sky. It also causes
artifacts—shapes and colors that weren’t
in the original photo and are solely the prod-
uct of mathematics. Eventually the photo may
come to look posterized, so named after
posters that have been simplified by using
only a few colors.

7


A new form of JPEG, called JPEG 2000, compresses photos by using wavelettechnology—a type of mathematical calculation that
transforms pixel values into strings of numerical tokensfor frequently recurring combinations of pixels, such as combinations of red
and blue pixels that might be used to create a brown tree trunk. The strings replace the cruder blocks of JPEG compression and result
in smaller files without the same types of visual artifacts seen in standard JPEG photos. JPEG 2000 uses a .jp2or.j2kfile extension.
It is not yet widely supported.

8

Free download pdf