JPEG lossy Compression to Image for Web Graphics|part 3


Lossy compression is cumulative

Getting familiar with the JPEG compression

Using Progressive JPEGs

Decompression process

You can get a license to have exclusive rights to an image so that your competitor doesn’t use the same photo on their site.


Lossy compression

Lossy compression reduces bits by identifying unnecessary information and removing it The process of reducing the size of a data file is popularly referred to as data compression, although its formal name is source coding.

Lossweb compression

Lossy compression is cumulative, which means you lose image data every time you save an image as a JPEG. If you open a JPEG and save it as a JPEG again, even more image information is thrown out than the first time you saved it. Be sure to keep your full-quality original and save JPEG copies as needed.

Why Use JPEG?

JPEG allows you to control the degree of “lossiness” by adjusting compression parameters. This way, you can achieve very small files with just the minimum amount of quality that you really need.


JPEG is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. JPEG compression discards image detail to achieve smaller file sizes. At high compression rates, image quality suffers. JPEG typically achieves 10:1 compression with little perceptible loss in image quality. As shown in the image on the down.


You can control how aggressively you want the image to be compressed. This involves a trade-off between file size and image quality.


Be aware that once image quality is lost in JPEG compression, you can never get it back again. For this reason, you should avoid resaving a JPEG as a JPEG. You lose image quality every time. It is better to hang onto the original image and make JPEG copies as needed. That way, if you need to make a change to the JPEG version, you can go back to the original and do a fresh save or export.

Progressive JPEGs

Progressive JPEGs display in a series of passes (like interlaced GIFs), starting with a low-resolution version that gets clearer with each pass. The advantage to using progressive JPEGs is that viewers can get an idea of the image before it download completely. JPEG come in two flavors: baseline and progressive.

JPEG format, you will be presented with the following Format Options:


  • Baseline: the image will be displayed line by line on the screen
  • Baseline Optimized: Same as Baseline, but optimized further using Huffman coding
  • Progressive: You can specify 3-5 scans, meaning that it will have between 3-5 phases before it shows the final image


Also, making a JPEG progressive usually reduces its file size slightly. The disadvantage is that they take more processing power (which can make them problematic for low-end mobile devices) and can slow down final display.


The decompression process may produce values outside of the original input range of  . If this occurs, the decoder needs to clip the output values keep them within that range to prevent overflow when storing the decompressed image with the original bit depth.

Next Tutorial

Previous Tutorial