DEV Community

gokayburuc.dev
gokayburuc.dev

Posted on

1

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

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more