Thursday, February 22, 2007

Simple Image Compression Techniques

Before jpeg, gif, and png, images were compressed by much simpler means, often by analog circuits.

Analog TV uses two channels, luminance (the signal used by black and white TVs) and chrominance (color). The trick NTSC uses is to spend relatively more bandwidth on luma than chroma because the human eye is more sensitive to light than to color.

This image employs this techniques, but takes it a step further. The image is in CMYK. All color channels were reduced to 50% the resolution (requiring 1/4 the space) and due to the human eye being even more insensitive to yellow, the bits used were reduced by 50% to 4 bits.

So, the math:

Originally, each channel took the same space, s, so a total of 4s bytes were used. Cyan and magenta are reduced to .25s , each. Yellow, now requiring 4 bits per pixel, not 8, is reduced to .125s. The resulting space required is 1.625s, or around 41% of the original.

Here's the result (you should click it for the full effect; the image is too large):
The left-most pane is the original image. The middle-left pane is the result of resizing the image to take 40% the space, then resizing it up. The middle-right pane is the result of the aforementioned color specific process. The right-most pane is the same as the previous one, only with 1 bit yellow.


Things to note: the pink flower in the 2nd pane from the left is quite blurry when compared to the neighboring panes. The 3rd pane looks less crisp than the 1st, but in a less tangable way. Note the perceived quality difference in colors between the 2nd and 3rd frames is neglegable, despite yellow's reduced precision. Finally, note the severe, but almost acceptable color changes between the 3rd and 4th panes.

No comments: