How to convert webp to grayscale png?
This can be done on the command line using the imagemagick
package. This has the advantage that it becomes easy to script for an entire directory of images (hint: either combine with the find -exec
command or a bash for
loop).
First install the package:
sudo apt update && sudo apt install imagemagick
Download an example webp image to test it out on:
wget https://www.gstatic.com/webp/gallery/1.webp
The imagemagick command:
convert 1.webp -colorspace Gray 1.png
You should now have a black and white png image in the same directory. -colorspace Gray converts the image to black and white.
For more info, try: man convert
Use GIMP 2.10.
click file>open and select open .webp file. Now go to image>mode>Grayscale Now go to File>export as and export as yourfilename.webp
and that is your image is converted to grayscale. While exporting it is upto you if want to select lossless or lossy.
Use Inkscape 1.1.1,
Open .webp
file by click Open
in File
menu [File > Open]
Now click on Export PNG Image...
in File
menu. [File > Export PNG Image...]
On the side, in the Export PNG Image
tab and Drawing
sub-tab, click on the Advanced
accordion.
Set Bit depth
on Gray_1
, Gray_2
, Gray_4
, Gray_8
, Gray_16
, GrayAlpha_8
or GrayAlpha_16
based on your needs.
Enter Filename
with .png
extension and click on Export
button.
This will convert your webp file to grayscale png.