JPEG Compression Algorithm

Danoja Dias
Break the Loop
Published in
5 min readMay 4, 2017

--

Today JPEG is very popular as a data format. But it is not really a data format. It is an compression method. There are many compression method and JPEG is one of them. It becomes a standard in 1992 and JPEG stands for Joint Photographic Experts Group. JPEG is a lossy compression method.

Lossy compression vs Lossless compression

Lossy compression is when the compression happens it losses data and it never cannot be remade to the original image.

Lossless compression is it does not loose data when compression happens and it can be regenerated to the original image.

JPEG Compression Algorithm

JPEG Compression algorithm has five main basic steps.

  1. RGB color space to YCbCr color space Conversion
  2. Preprocessing for DCT transformation
  3. DCT Transformation
  4. Co-efficient Quantization
  5. Lossless Encoding

Let’s see what are these steps in more detail.

1. RGB color space to YCbCr color space conversion

I assume you know these color spaces. If you want to know more about this read this article. In the JPEG compression algorithm, first what it does is this conversion. An digital image in RGB format that is a combination of Red, Green, Blue color channel is converted to YCbCr color channels. Y is the…

--

--

Danoja Dias
Break the Loop

ATL at Enactor Ltd | Former R&D Engineer at Synopsys Inc | Former Intern at WSO2 | BSc Computer Engineering | GSoC2016 | http://linkedin.com/in/danojadias