Using Romeo and Juliet to Illustrate the Pitfalls of JPEG Compression

romeojpeg1

It’s common knowledge that JPEG compression leads to a loss of data, but it’s difficult to really visualize the extent of that loss in a photo. A keen eye will be able to tell a difference, but it’s still hard to quantify it.

Tom Scott wanted to bring the reality home to those who don’t already understand it. So he took the pitfalls of JPEG compression and transferred them from the world of photos, to the world of Shakespeare.

As an experiment, he decided to apply different levels of JPEG compression to the text of Shakespeare’s Romeo and Juliet. In short order, “The Tragedy of Romeo and Juliet by William Shakespeare” became “She Uragedy!of Romeo Anb!kulies by Vilmibm Shakfrpease” — and that was only the first level of compression.

romeojpeg2

On his blog, Scott reprints the famous balcony scene post-compression at “maximum” quality in Photoshop:

O Romep+ Rpldo wiepffnre arr!riov Romep@
Dgoy thz gatggr `me tefusf sgx n`me!

He achieved this by importing the text as a RAW file, then exporting the compressed result as plain text. As you can see, even “maximum” quality isn’t exactly great. Because we can only take in a small number of bytes of information in text form per second, mistakes are obvious. Scott maintains that, in photo form, the errors that arose above would translate into “a minuscule change in colour, undetectable to the eye.”

romeojpeg4

It amounts to an interesting experiment that he wanted to attempt on a whim, but when he was done he decided to bind all of the final products in book form — from “maximum” to “minimum” quality.

For more info on how he performed the compression and how he got around the issues that arose in the process, head over to his blog and read about the experiment from the man himself.

(via Laughing Squid)


Image credits: Photographs by Tom Scott.

Discussion