A few months ago, Google open sourced the VP8 video codec as part of the WebM video project, to create a truly Free/free unencumbered video format for the web as an answer to the non-Free/free patent-encumbered H264 format. Today, Google launched a new image format for the web, WebP, which aims to significantly reduce the file size of photos and images on the web.

Google explains that of all the bytes transmitted through the intertubes today, 65% is made up of images and photos. In other words, if there's an area where you can save on bandwith - and thus, speed up the web - it's image optimisation. To that end, Google has unveiled WebP, an image format which makes use of the techniques from VP8 video intra frame coding. The container format is lightweight, and based and based on RIFF.

A more detailed explanation can be found on WebP's website. "WebP uses predictive coding to encode an image, the same methodology used by the VP8 video codec to compress keyframes in videos," the page reads, "Predictive coding uses the values in neighboring blocks of pixels to predict the values in a block, and then encodes only the difference (residual) between the actual values and the prediction. The residuals typically contain many zero values, which can be compressed much more effectively. The residuals are then transformed, quantized and entropy-coded as usual. WebP also uses variable block sizes."

So, what is the result of this? "In order to gauge the effectiveness of our efforts, we randomly picked about 1,000,000 images from the web (mostly JPEGs and some PNGs and GIFs) and re-encoded them to WebP without perceptibly compromising visual quality," writes Richard Rabbat, product manager at Google, "This resulted in an average 39% reduction in file size. We expect that developers will achieve in practice even better file size reduction with WebP when starting from an uncompressed image."

They've set up a comparison site, with the original JPEGs on the left, and the re-encoded WebP images on the right. In this case, the WebP images use the PNG container format so we can actually see them. To my untrained eye, there's absolutely no difference, and I have a pretty decent monitor. The one difference I do not is the sometimes ridiculous reduction in file size - which makes me happy.