A past paper question from a Multimedia Systems exam:

If you had an X-Ray photograph of a leg which might be broken, which would give better compression before artifacts were visible, and which would you choose?

I think the answer is JPEG. However, my class mate thinks it is PNG.

I chose JPEG because:

  1. The JPEG could be set to a low compression ratio (such that the quantization matrix will preserve most of the high frequencies from the DCT and still reduce the size of the coefficients). However, as a result, run-length encoding would yield significantly lower lossless compression ratio because there will be fewer zeroed high frequency coefficients, and as a result there many not be any subset of values with significantly large frequencies.

  2. PNG is exlusively lossless compression which uses DEFLATE (LZ77 with Huffman). However, even though a X-Ray is mostly black and white, there are very subtle differences in the luminosity between pixels which would mean that PNG would not be able to achieve a high compression ratio. The PNG would be significantly larger than the JPEG before the compression on the JPEG was such that it would yield visible artifacts.

I'm looking for an authoritiatve answer. Is my reasoning sound, or would PNG be the better image format?

  • The question is flawed, and is leading the reader down the wrong path. Storage is now very inexpensive, especially when compared to the cost of an X-Ray machine. Lossless compression should be utilized in order to eliminate the possibility of compression artifacts and to preserve the most accurate image possible. This is especially true for images such as X-Rays where zooming in on small areas is often desirable. – RockPaperLizard Sep 13 '16 at 1:44
up vote 1 down vote accepted

It's the JPEG. The keyword here is visible. The entire reason for JPEG working so well is that you can quantize away lots of high frequencies before the human visual system can even perceive any artifacts.

Also note that before artifacts (like ringing) become present, the picture will simply lose high frequencies. Without a reference picture to compare against, a human would probably not see the absence of high frequencies.

Your other assumptions are all correct.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.