Monday, February 14, 2011

Lossy File Formats RULE!

The JPG format, for lossy picture file compression, was made to save space... But lets see how SPACE SAVING we can go, while retaining the idea of the original image!

For my source image, I chose the (somewhat ugly) album cover of "In The Court Of The Crimson King", by King Crimson, in a decent 300 by 300 resolution. Below each picture, I will give the file size of the image. In this experiment, I stopped when the resulting file was wholly unrecognizable. As stated earlier, everything is done in the JPG file format.


Original image, 36.1 Kilobytes. Schizoid Man sure is a handsome chap, ain't he?


8.4 KB. Still quite recognizable, despite the fact that the file size is nearly a fourth of its original size.


3.1 KB. Almost one twelfth of the original file size, and it is starting to look blocky. Zoom in to see the interesting patterns within each compression block.


1.7 KB. Individual solid colored blocks are now clearly visible, and colors are being obviously rounded together. Overall image still recognizable though, even at such a small file size.


1.5 KB. Compression rate is slowing down, I decide to begin compressing by resolution to increase reduction per step. Each of the following steps, I reduce the resolution of the image, then return it to original size, while also continuing normal jpg compression.


1.2 KB. Barely even recognizable any longer. However, size reduction is significant. Compression 'blocks' are barely even recognizable as a whole any longer, being replaced by large ugly patches of solid color.


File has now reached the landmark of 1 kilobyte. To give you an idea of how small that is, the wikipedia article for Michael Jackson is nearly 3000 times the size of this single image, not including the pictures/media included on the page.

However, the results are less than decent. I contest that only the most seasoned of King Crimson fans would be able to recognize the image above without any suggestion. At this high a compression level, squinting your eyes and looking at the image from far away is one of the only things that could possibly help your recognition of the subject. 

Despite all this, lets go one level lower, just for the heck of it.


0.9 Kilobytes. Uhh, yeah... I think we are done here.

Side note: Perhaps this experiment could be replicated with other lossy formats, for example, the lossy audio format, mp3?

No comments:

Post a Comment