webp

How to: Convert JPEG, PNG, BMP to WebP image formatRequirements: Linux

Yesterday Google introduced the new image format – WebP which aims to go head-on with JPEG with 40% smaller file size. We also did a visual comparison of the two formats which clearly showed the efficiency of WebP. Today we bring you a small tutorial on how to convert any JPEG, PNG or a BMP into a WebP image file.

Two important things:

1) The tutorial requires Linux installed on your computer because the only converter available as of now supports only Linux. Moreover, you need to know basic terminal commands. (Don’t worry though, we’ll help you)

2) The WebP images that you will be able to generate after following this tutorial will be utterly useless. Atleast for now. That’s because there are no WebP image viewer software available. So, to deal with this issue, we’ll convert the WebP image into a lossless PNG. That way, we’ll be able to ‘actually see’ what WebP conversion looks like. Let’s begin.

Convert JPEG, PNG or BMP to WebP

1) Boot into your Linux computer and open up your favorite web-browser. Download ‘webpconv‘ file from this page.

2) Store the ‘webpconv‘ file in the home folder and then open up the ‘Terminal’.

3) Type the below command and press enter:

chmod a+x webpconv

4) ‘webpconv‘ has now turned into an executable file. To simplify things, put your JPEG, PNG or BMP image also into the home folder.

5) Run the following command in the ‘Terminal’ and press enter:

./webpconv <YOUR_IMAGE>.jpg

6) Voila! A new WebP image filw will be generated in the same folder which is surprisingly smaller than the original JPEG, PNG or BMP file.

To view WebP files:

As I said earlier, due to the complete lack of WebP image viewers as of now, we will convert the WebP image in to a PNG equivalent. PNG is a lossless conversion method preserving 100% image quality.

Run the following command in the ‘Terminal’:

./webpconv -format PNG <YOUR_WEBP_FILE>.webp

The above code will generate the exact PNG rendition of the WebP file. Compare the images.

Options:

There are two options which you can specify for WebP conversion – Format and Quality. If you are converting a JPEG, PNG or BMP into WebP, you don’t need to specify the ‘Format’. As for the quality, you can specify it in the range from 1 to 100. Here’s the syntax:

./webpconv -format JPG -quality 85 <YOUR_WEBP_FILE>.webp

This tutorial is the only way to convert JPEGs, PNGs and BMPs to WebP until someone comes up with a decent GUI based tool along with support for other platforms too.

If you liked the tutorial, do us a little favor by sharing this post :)

Visual comparison: JPEG vs. WebP (Google’s new image format for the web)JPEG is currently the most widely used image format in the world. It is a lossy compression method used since over a decade and has been working great. "Not exactly" thinks Google and decides to rewrite a completely new image format for the web which it claims to generate 40% smaller image files than JPEGS with undistinguishable difference in the quality of the image. Google calls it ‘WebP’ (file extension .webp).

According to Google, 65% of the data floating on the internet at any given time is actually an image. And about 80% of these images are JPEGS. With the new WebP format, based on the VP8 codec that Google introduced in May 2010, Google expects faster image transfers over the internet. Even though WebP is a lossy compression method, it fares really well when it comes to file size without affecting much of the quality. Look for yourself:

Original JPEG Image                       WebP Image

JPEG imageWebP image

Impressed? Here’s a small tutorial to convert JPEG, PNG or BMP files to WebP format: VIEW TUTORIAL

Now before you smart people jump on me let me clarify that the image on the right is a lossless and exact PNG rendition of the original WebP image. Because WebP is an extremely new image format, your computer won’t display it. Nor there are any WebP image viewers available at the moment. PNG is a lossless image format which preserves 100% image quality and hence it is used to display what the WebP conversion looks like.

In case you’re curious, here is the WebP image file: WebP-Dance.webp [Right click > Save Target As…]

Size of the original JPEG file: 114KB

Size of the WebP converted image: 37.2KB 

Difference: 67.3% smaller

Now imagine all the images on the web shrinks down by that percentage. Amazing isn’t it. The best part is, you can control the output image format and quality. While converting any image format to WebP, you can provide the desired image quality in the range from 1 to 100.

On a serious note though, it’s one hell of a herculean task to steal JPEG’s thunder. WebP conversion takes about 8 times longer than JPEG conversion. And Google knows it’s not going to be as easy as making WebM the defacto standard for web videos. WebM’s story is completely different because Google has YouTube on its side and thus can mould the web video standards the way it wishes. When it comes to images however, what Google can atmost do is to provide native WebP support in Chrome. This means that other webkit browsers like Safari can also support the format. That way, it can atleast start spreading the format in the mainstream.

Shifting mass attention to a new format is no joke, especially when the competitor is a reigning champion since 18 years. But when something is backed by innovation, cutting edge performance and the internet giant himself, you never know.