Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



How to convert WEBP...
 
Share:
Notifications
Clear all

[Solved] How to convert WEBP files to PNG in Terminal, DOS or Shell

4 Posts
3 Users
2 Reactions
3,020 Views
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2785
Topic starter  

Occasionally I run into pictures that I copy from websites, which Google Chrome then feels the need to store a .webp files.
Google states this on their format:

WebP is a modern image format that provides superior lossless and lossy compression for images on the web

I honestly do not know if this really is the case, but I do know it is annoying that most graphics applications (at the time of writing this) do not support the WEBP file format.

There are several methods to convert a WEBP file to something useful, for example online converters, and some desktop applications.
But there is a method that works straight from the command line (Terminal, DOS, Linux Shell) by using the Webp-tools from Google from here.

Select the one suitable for your OS, and extract the file.

You will find a tool in the archive called "dwebp" (in the bin directory), which "Decodes the WebP image file to (default) PNG format" as such:

./dwebp -o output.png input.webp

The tool also supports output as PAM (raw RGBA), PPM (raw RGB), BMP, TIFF, PGM and YUV.

If you would prefer for example BMP, then this can be doen as such:

./dwebp -bmp -o output.bmp input.webp

 

I'm not sure if this will work under Windows or Linux, but under MacOS I found that I can just copy the file (dwebp) to any location, and it doesn't seem to need any of the other files.


   
ReplyQuote
(@vihadigital)
New Member
Joined: 4 years ago
Posts: 1
 

Thank you for such a valuable piece of information I will definitely try this with my images... 


   
Hans reacted
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2785
Topic starter  

👍 

If you don't mind using an online service, then EzGif.com is a good alternative as well, and it supports animated WEBP images to Animated GIF.


   
graate reacted
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
 

@hans great recommendation, thanks!


   
ReplyQuote
Share: