How JPEG Compression Works
Explaining the magic steps behind JPEG compression
JPEG is the most used digital image format. It’s used everywhere, from the internet to professional photo cameras. A lot happening behind the scene when creating a JPEG. In this article, we will explore that.
This article is a part of a series of articles discussing concepts of image processing. Check out the previous articles:
- Image Processing and Pixel Manipulation: Photo Filters
- How to Create a Photo Mosaic in Python
- Image Processing: Image Scaling Algorithms
JPEG is actually the name of the entity behind the file name. Joint Photographic Experts Group created the standard and published the first JPEG standard draft in 1992.
JPEG uses lossy compression. Which means that information is lost in the compression process.
Color Space Transform and Subsampling
Since monitors have three color components for every pixel, one for red, one for green, and one for blue, they use the RGB color space. We will assume we have an image in the RGB color space and we will save it as a JPEG image.
Human eyes are more sensitive to brightness than color. For this reason, JPEG…