Why JPEG is “Lossy”


Today’s Question: I recently received some files from a local museum that looked to be very small at less than 1 MB in size. When I opened them they had more data than I expected. They were saved originally with a Quality setting of “8”. What data quality is lost when images are saved at a lower JPEG quality setting? When the file is reopened do we get the lost detail back?

Tim’s Quick Answer: When you save an image as a JPEG file, the Quality setting determines how much compression is applied. The number of pixels does not change, but the actual pixel values do. Thus, quality is lost, and that quality can’t be improved for that version of the image file.

More Detail: Compression for JPEG images operates by essentially “simplifying” the pixel values in the image. This is typically done by dividing the image into blocks of pixels in a 16×16 grid. That means there are 256 pixels within each block. The JPEG compression will actually alter the pixel values within each block of pixels. The pixel values are “simplified” so those pixel values can be described more efficiently. This is how a smaller file size is achieved.

When a lower Quality setting is used, there is more simplification of the data applied for each block in the pixel grid. In other words, the file size is compressed more, but the quality is reduced in the process.

When you save a JPEG image, the compression is applied to the actual pixel data. That data can’t be magically reconstructed when the image is opened again. In other words, compression will permanently reduce the quality of a JPEG image. This is why JPEG compression is referred to as “lossy” compression. Quality is lost to at least some extent whenever you save an image as a JPEG file.