Glossary Design & Media

JPEG

JPEG is a lossy image format designed for photographs that makes small files by discarding detail the eye is least likely to notice.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

The encoder converts colours to brightness plus two colour channels, usually stores the colour at half resolution (chroma subsampling 4:2:0), splits the image into 8 × 8 blocks and turns each into frequencies with a discrete cosine transform. The quality setting decides how coarsely those frequencies are rounded; the 1–100 scale is not standardised, so "quality 80" differs between programs. Baseline files load top to bottom, progressive files load blurry first and sharpen.

Why it matters

JPEG has no transparency, so transparent areas turn white or black on conversion, and it handles sharp text and line art poorly, adding halos and blocks; use PNG for those. Each re-save recompresses and loses a little more, so edit first and export once. Photos from cameras and phones also carry EXIF metadata, which may include the GPS location.

Example

Every JPEG starts with the bytes FF D8 FF and ends with FF D9. The next byte tells the variant: E0 is a JFIF header, E1 an EXIF header. A file written by an image library began:

FF D8 FF E0 00 10 4A 46 49 46 00   ......JFIF.
AdSense Placeholder
Slot: footer_leaderboard