Lossless algorithms
- No information is lost. Repeated patterns in the image
are utilized. RLE (run-length encoding) and PackBits algorithms are used.
Other lossless algorithms are Huffman compression and
LZW (Sempel, Ziv and Welch). LZW used with compressed tiff.
Lossy algorithms
- Based on assumption that high frequency data captured by scanner will
not be perceived and can be discarded as noise.
Most popular lossy algorithm is JPEG (developed by Joint
Photographic Experts Group).
Uses discrete cosine transform (DCT) a type of Fourier
transform.
JPEG can be very effective at times with insignificant
loss of quality.
However often can lead to excessive smoothing of detail,
fringing or shade stepping in smooth areas.
Postscript Level 2 can compress and decompress JPEG and
LZW images.
Recall that Photo CD images utilize subsampling (1 bit
of color information kept for each 4 bits of lightness) which leads to
significant file compression.
Interpolation is used to restore as much lost color information
as possible during decompression.