JPEG
Standard maintained by the Joint Photographic Experts Group
JPEG is a widely used image compression standard and file format for storing photographic and other continuous-tone raster images with lossy compression. It reduces file size dramatically by discarding image detail that is less perceptible…
Definition
JPEG is a widely used image compression standard and file format for storing photographic and other continuous-tone raster images with lossy compression. It reduces file size dramatically by discarding image detail that is less perceptible to the human eye, making it the default format for photographs on the web, in digital cameras, and in everyday image sharing. The name comes from the Joint Photographic Experts Group, the committee that developed the standard.
Overview
Digital images of real-world photographs contain enormous amounts of pixel data, and storing or transmitting that data uncompressed was impractical on the storage and network capacities available when digital photography and the web were emerging. JPEG was developed to compress photographic images to a fraction of their raw size while keeping visual quality acceptable to human viewers, solving the practical problem of moving and storing photographs efficiently. Mechanically, JPEG compression works by converting an image into a color space that separates brightness from color information, then dividing the image into small blocks and applying a discrete cosine transform to each block. This transform converts spatial pixel values into frequency components, and the encoder then discards or coarsens the high-frequency components that the human eye is least sensitive to, a process controlled by an adjustable quality setting. The remaining data is further compressed losslessly, producing a file that can be an order of magnitude smaller than the original while looking nearly identical at typical viewing sizes. JPEG differs from lossless formats such as PNG in that it deliberately discards information to achieve much smaller file sizes, which makes it well suited to photographs with smooth gradients and poorly suited to sharp-edged graphics like text or line art, where its compression artifacts appear as blockiness or blurring around edges. Its successor, JPEG 2000, improved on some of these weaknesses using different underlying mathematics, but never displaced the original format's near-universal support across browsers, operating systems, and cameras. In practice, JPEG is the default output format for consumer and professional digital cameras, the standard format for photographs embedded in web pages, and a common target format when converting or resizing images for storage efficiency. Photo editing software exposes its quality setting directly, letting users trade off file size against visible artifacts depending on whether an image will be viewed at full resolution or thumbnail size. Its universal decoder support makes it a safe default when compatibility matters more than maximum fidelity. The format's core limitations stem directly from its lossy design: repeated editing and re-saving of a JPEG file compounds compression artifacts each time, it has no native support for transparency, and it performs poorly on images containing text or sharp synthetic edges. For lossless or transparency-requiring use cases, formats such as PNG remain preferable, and for very high compression ratios at high quality, newer formats have emerged, though JPEG's ubiquity means it remains the pragmatic choice whenever broad compatibility is the priority.
Specification
- Lossy compression using block-based discrete cosine transform
- Adjustable quality setting trading file size against fidelity
- Near-universal decoder support across browsers and devices
- Optimized for continuous-tone photographic images
- No native support for transparency
- Compression artifacts compound with repeated re-saving