free webp conversion tools

FlipTopBin

Member
Game Developer
Dec 5, 2017
176
223
I currently use image magick which occasionally leaves artifacts or inappropriate transparent areas of images.

Can anybody suggest an alternative free tool I could use which doesn't suffer from these issues?
 

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,024
I've had similar issues with webp. Not with artifacts, but with transparency. I used to retouch/resize transparent character overlays. No matter what kind of quality settings I used for the webp export (lossy or lossless) ... the hair around the characters head would always look weird. Compared to a png it looked to "thin". Something with the transparency was just wrong and I've decided to stay away from webp. A shame since webp would probably compress better.

edit: My current version of GIMP is 2.10.4 and it can save lossy and lossless webp, but cannot open lossless again. My systems default Image Viewer is a . It can save webp. I've not tried that one yet. It has a batch-converter that I use sometimes to quickly convert entire image-folders to a new format. It can open a lossless webp from GIMP.
 

redknight00

I want to break free
Staff member
Moderator
Modder
Apr 30, 2017
4,551
20,221
I use XnConvert for the most pasrt, or IrfanView if it's just one image (I have not tried batches in it).
 

FlipTopBin

Member
Game Developer
Dec 5, 2017
176
223
I just discovered cwebp thanks to @UncleVT which is Googles official conversion tool and that seems to work a treat!

Go here and follow the link to download the package of tools (I used the file called ) Then you can use the powershell script below (or something similar) to convert everything. Size is slightly larger than image magick produced but no issues that I have found so far. Transparency which was an issue in some of my images as well is fine now.

Code:
param([string] $file_pattern = "*.png")

$images = Get-ChildItem $file_pattern

foreach ($img in $images) {
  $outputName = $img.BaseName + ".webp"
  cwebp.exe -q 85 -z 6 -mt $img.FullName -o $outputName
}
Usage: Download cwebp and put it in your path somewhere. Copy the script to a file with the extenstion .ps1 (I used webp.ps1) and put that in the path as well. Then to invoke the script use:

webp [file name with or without wildcards]

If you don't supply a filename it defaults to *.png

examples:

webp really_big.png
webp *.jpg
webp

Results make this well worth doing:

-a---- 28/10/2018 15:03 3327934 chris3_on_desk_smile.png
-a---- 13/12/2018 13:24 244964 chris3_on_desk_smile.webp
 

Loys

Member
Game Developer
Oct 19, 2018
411
4,761
I currently use image magick which occasionally leaves artifacts or inappropriate transparent areas of images.

Can anybody suggest an alternative free tool I could use which doesn't suffer from these issues?
Hi @FlipTopBin ! I use Romeolight WebPconv. It's free and powerful.
 
  • Like
Reactions: Serj 07

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,024
I've looked into using cwebp and no matter what quality settings I used (-q, -psnr, -size) the encoder is overly aggressive. Even with -q 100 the quality loss is very visible.

Maybe it's the scanline pattern in this image, but here is an example of an image that turns into a mess when using:
cwebp -m 6 -q 100 -mt -noalpha -progress %1 -o "%~n1.webp"

webp converted back to png for demonstration.png
The forum does not support webp. So to demonstrate the quality this was converted back to a png. Check the attached zip-file to compare with the source.

Especially the 'IDEAS ARE BULLET-PROOF!' text in the background washed out compared to the source png or jpg. Feel free to prove me wrong and give me your encoder settings. I've not tested with transparency yet since the quality is already a 'no go' for me.

cwebp also fails to remove an unnecessary alpha channel if the image is 100% opaque.

The JPG looks much better for a few KBs more. An attempt to manually allow more space for cwebp with -size 200000 results in a file still under 100 KB.
  • 578.212 bytes PNG source unoptimized with alpha channel
  • 138.025 bytes JPG exported with GIMP quality 94%, Adv. Options [x] Progressive, Subsampling 4:4:4
  • 94.142 bytes WEBP -m 6 -q 100 -mt -noalpha -progress
Look's like WEBP and I won't become friends due to the quality:


For the future I hope that the (not yet stable) AV1 Image File Format (AVIF) will receive better support than WEBP or .
WEBP was only pushed by Google and FLIF got ignored by everyone even though it did beat all other formats in compression.
 

Epadder

Programmer
Game Developer
Oct 25, 2016
568
1,064
I've noticed that method (-m) 6 produces the best compression but is the most aggressive on images in general, method 4 gave the cleanest results with the best compression ratio. I will also say the more irregular patterns in an image the worse the quality degradation.

I still think it produces better file size results than JPG at around the same quality.

Of course all the images in my project are 2DCG, with how many images I have unless I wanted to give everyone a 30gb game in the end I'm have to balance the ultra quality vs practical to distribute.

I use xnconvert for reference (I don't know if it uses anything internally different from the command line tools).

In the Attached File:
  • A test png image (1,342 KB)
  • A lossless webp (791 KB)
  • Quality 100 Method 1 (384 KB)
  • Quality 100 Method 2 (384 KB)
  • Quality 100 Method 3 (293 KB)
  • Quality 100 Method 4 (293 KB)
  • Quality 100 Method 5 (290 KB)
  • Quality 100 Method 6 (287 KB)
  • Quality 97 Method 1 (256 KB)
  • Quality 97 Method 2 (253 KB)
  • Quality 97 Method 3 (247 KB)
  • Quality 97 Method 4 (248 KB)
  • Quality 97 Method 5 (243 KB)
  • Quality 97 Method 6 (238 KB)
  • Quality 93 Method 1 (182 KB)
  • Quality 93 Method 2 (181 KB)
  • Quality 93 Method 3 (179 KB)
  • Quality 93 Method 4 (180 KB)
  • Quality 93 Method 5 (181 KB)
  • Quality 93 Method 6 (179 KB)
  • Quality 87 Method 1 (154 KB)
  • Quality 87 Method 2 (129 KB)
  • Quality 87 Method 3 (125 KB)
  • Quality 87 Method 4 (126 KB)
  • Quality 87 Method 5 (123 KB)
  • Quality 87 Method 6 (121 KB)
 

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,024
Are there any offline brute force / 'crush' tools for lossless webp compression?
There are a billion for png's, can't find anything for webp.

I still want so badly :confused: