148 Graphic Communications
from the values of surrounding pixels. Because
lossless compression does not discard any of the
data, the decompressed image is identical to the
original.
Other common lossless compression methods
are the Huffman method, Lempel-Ziv-Welch (LZW),
and run-length encoding (RLE). Both the Huffman
and LZW methods of compression are techniques
where adjacent bits are replaced with codes of
varying lengths. For example, this technique would
encode the fact that zero occurs 20 times, rather than
using 20 zeros. This information would use 4 bytes
instead of 20. Run-length encoding (RLE) encodes
digital data to reduce the amount of storage needed
to hold the data without any loss of information. Each
coded item consists of a data value and the number
of adjacent pixels with the same data value. In other
words, strings of the same character are encoded
as a single number. This is a very effi cient way of
encoding large areas of fl at color used in linework
and text.
Lossy Compression
A lossy compression algorithm refers to data
compression techniques in which some data is lost.
Lossy compression methods attempt to eliminate
redundant or unnecessary information. Most video
compression technologies use a lossy compression.
This improves the speed of data transfer, but
causes slight degradation when the image is
decompressed.
Lossy compression techniques include
quantization, Delta Pulse Code Modifi cation (DPCM),
and JPEG. Quantization is a fi ltering process that
determines the amount and selection of data to
eliminate, so data can be encoded with fewer bits.
DPCM measures one set of bits and then measures
differences from that set. The differences are then
encoded into fewer bits.
Lossless compression is preferred for printed
images because each time a lossy compression is
applied, more information is lost. The loss of data
may not be noticeable on screen, but will be very
noticeable in high-resolution printed output.
The JPEG fi le format was created by the Joint
Photographic Experts Group, in collaboration with
the International Standards Organization (ISO)
and the Consultative Committee for International
Telegraphy and Telephony (CCITT). The JPEG
format was designed to establish an international
data compression standard for continuous-tone,
digital still images. JPEG compression is an open-
system, cross-platform, cross-device standard that
can reduce fi les to about 5% of their normal size.
JPEG is based on the discrete cosine transform
(DCT) algorithm, which analyzes each pixel block,
identifi es color frequencies, and removes data
redundancy. This algorithm requires the same amount
of processing to either compress or decompress an
image. JPEG compression can incorporate other
algorithms, including quantization algorithms and
one-dimensional, modifi ed Huffman encoding.
JPEG is a popular standard for images used on
the Internet due to its extreme compression capacity
and ability to support 24-bit color. The JPEG fi le
format allows the compression ratio and reproduction
quality to be controlled at the point of compression,
Figure 7-31. JPEG fi les contain bitmap information
only and support grayscale, RGB, and CMYK color
models.
A major goal of JPEG is to maintain the
appearance of an image, rather than the actual data
contained in the original. This works because we are
visually less sensitive to high-frequency color. JPEG
is a lossy compression, and therefore deletes some
image information, but the decompressed image
remains visually whole.
JPEG functions best for color and grayscale,
continuous-tone images. Compressing images with
high-contrast edges (such as line graphics or text) to
signifi cantly reduce the fi le size, adversely affects the
portion containing the text. Selective compression
Figure 7-31. When saving a fi le using the JPEG
compression option, there are several encoding
options available.
Previous Page Next Page