DEV Community

Gokay Buruc
Gokay Buruc

Posted on

webp files into the png via linux terminal

webp

Converting .webp files downloaded from the internet to image formats such as png and jpeg can often be troublesome and frustrating. What would you think if I told you that you could do this with a single line of code via your Linux terminal?

What I'm about to tell you is life-saving information, especially for those who deal with graphic design. Without further ado, let's move directly to the methods on how to do it:

webp method

First of all we have to install webp to our system to use our converter. Open your terminal and copy paste the code below.

Her is simple instruction :

  1. Install webp
sudo apt install webp 
Enter fullscreen mode Exit fullscreen mode
  1. use dwebp to decode file
dwebp {{ input_file_path }} -o {{ output_file_path }}
Enter fullscreen mode Exit fullscreen mode

For instance :

dwebp fullhdfilmsites.webp -o proxima_movie_cover.png

Enter fullscreen mode Exit fullscreen mode

ffmpeg method

ffmpeg comes as default converter with most of the linux distro's. But if you don't have ffmpeg you have to install it first.

apt-get install ffmpeg

Enter fullscreen mode Exit fullscreen mode

Then use this code below:

ffmpeg -i {{input_file_path}} {{output_file_path}}
Enter fullscreen mode Exit fullscreen mode

For instance :

ffmpeg -i fullhdfilmsites.webp proxima_movie_cover.png
Enter fullscreen mode Exit fullscreen mode

Top comments (0)