Google’s new VP-8 based images are being tested as a potential replacement for the traditional JPEG image format. The new format, called WebP, will speed up page loading with its smaller file size without compromising quality. So far, the test (of around 1 million images) currently shows an average reduction in file size of around 39%. In order to achieve this reduction, the WebP format makes use of the advanced, still-image compression methods used by VP8 video codec to compress individual frames. Thus, it might someday replace the JPEG as the standard format for photos and similar content on the Web.
Since this is a new image format, you will not be able to see WebP images in browsers or image viewers until support for the format has been provided for those programs. However, you can view Webp images by converting them into PNG format and using your favourite PNG viewer (since PNG is a lossless compression, it will produce an exact rendition of the WebP image content. Currently, the WebP team is proposing a patch to WebKit to provide native support for WebP, so you will be able to view your images in an upcoming release of Google Chrome.
To convert images to WebP or another format, use webpconv on the command line. The webpconv command has the following syntax:
webpconv [-output_dir dir] [-format format] [-quality quality] input_file(s)
Arguments
-output_dir
Path to directory where files are placed. If no path is specified, files are created in the input directory.
-format
Output image format. Valid formats are: BMP, JPEG, PNG, WEBP.
-quality
Integer. Parameter that specifies the trade off between the file size and the quality of the output image. The range is from 0 to 100; 100 is the best image quality with the largest file size. If no value is specified, the default quality value corresponds to a target peak signal-to-noise ratio (PSNR) value of 42. A PSNR value of 42 is usually regarded as a good quality image.
Examples:
You can convert a PNG image in /home/user/images/ to a WebP image with a quality range of 80 with the command:
webpconv -quality 80 /home/user/images/img.png
You can convert a group of WebP images in /home/user/images/ to PNG and place them in the /tmp folder with the command:
webpconv -output_dir /tmp -format PNG /home/user/images/*.webp
You can convert WebP images back to PNG format using webpconv on the command line. For example, to convert all of the webp files in /home/user/images/, enter the following:
webpconv -output_dir /tmp -format PNG /home/user/images/*.webp
Meanwhile, Google has published a gallery of samples that compare WebP-encoded images next to equivalent JPEG images. However, some critics contend that WebP “falls flat compared to JPEG due to weaknesses in the VP8 encoder” and deem the announcement to have been made too early. While there is no doubt about the usefulness of having more effective compression of images in place, previous attempts have not gained much traction. It remains to be seen whether Google’s WebP will be any different.
Talking Point
Is JPEG good enough or is Google right to seek a replacement for the popular image format?
