JPEG
A lossy format optimized for photographs. Uses DCT for high compression but degrades on re-compression.
JPEG (Joint Photographic Experts Group) is a still image compression standard from 1992. It uses lossy compression exploiting human visual perception to store photographs at high compression ratios.
The compression pipeline divides images into 8x8 pixel blocks, applies the Discrete Cosine Transform (DCT) to convert spatial data into frequency components, then quantizes high-frequency components less perceptible to the human eye. Huffman coding performs final entropy compression.
- Quality parameter: A value (for example 0-100) controls the compression-quality trade-off
- Progressive JPEG: Renders incrementally from low to high resolution for early previews on slow connections
- Color space: Converts to YCbCr and subsamples chroma (such as 4:2:0) for additional compression
Limitations include no alpha channel support, visible block artifacts on sharp-edged content like text, and cumulative generation loss on re-compression. In editing workflows, intermediates are preferably kept in PNG or TIFF, with conversion to JPEG only for final delivery.