lossy or lossless

I have few questions on JPEG Compression.

In my windows system, I have some image processing application. For example, Windows msPaint: which provides an option to convert BMP image to JPEG format.

Can anybody please tell me, what is the JPEG compression here using in mspaint- is it lossy or lossless.

If somebody is referring to "JPEG Standard compression", which compression it is internally using: lossy or lossless?

Thanks in advance. Alvin


JPEG compression is considered a lossy compression, because it is not possible to build the exact binary from an original source through uncompression.

Even at the highest quality, JPEG works by discarding data. You control the quality to trade off what you think is an acceptable loss to still have a fair representation of your image. Although data is lost, what can be seen might still be identical to the untrained eye - and that is the point. The same as what minidisc used to do for audio.

The intent for JPEG is to make photographic images smaller in file size for internet transmission, you get to decide how small, but if you want absolute quality a format like TIFF is better suited.

Incidently, TIFF offers a lossless compression, but the file sizes are still massive!

One more thing... If you take a 300 x 500 bitmap and convert it to JPEG, then convert it back. The file size will still be the same, because bitmap works by storing a common number of bits per pixel. But the contents of the file will be quite different. In this regard it might be naively viewed as lossless, but in practical terms it is far from it.


JPEG is a family of related compression techniques. There is lossless JPEG but is it generally relegated to 12bit, medical applications.

Any JPEG that you are likely to use creates loss. This occurs at several steps.

  • The transformation from the RGB to YCbCR. The two color spaces intersect but do not have the same gamut of colors. RGB colors outside of YCbCr get clamped into range. Also the transformation from RGB to YCbCr is a floating point operation that creates integer values, so there are rounding errors.

  • The Discrete Cosine Transform is usually performed on the data using scaled integers. This introduces small rounding errors. Even if you do this in floating point there will be some small errors and the values have to be rounded to integers for the final output.

  • Quantization is the big one. This divides the DCT output by integer values. You can eliminate rounding at this step by making all the quantization values 1.

  • 链接地址: http://www.djcxy.com/p/62894.html

    上一篇: 在MATLAB中实现JPEG压缩

    下一篇: 有损或无损