ainame / Swift-WebP

A thin libwebp wrapper in Swift that provides both encode/decode APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing encoder quality has no effect on the output file

matylla opened this issue · comments

I'm currently playing with your framework. However, changing output quality has zero effect on the output file. Can you please verify? The two configs below produce the exact same image:

var config = WebPEncoderConfig.preset(.photo, quality: 1)
var config = WebPEncoderConfig.preset(.photo, quality: 100)

Also, setting an additional quality property on config seems to have no effect:

var config = WebPEncoderConfig.preset(.photo, quality: 100)
config.quality = 100

var config = WebPEncoderConfig.preset(.photo, quality: 1)
config.quality = 1

Well, that's pretty embarrassing, but there was a bug on my side. I was overwriting the output image with another method. The quality param works just fine. Thanks for this framework and keep up the good work.

No worries👍 Thank you for giving this a try. Let me us if you find another issue on this library.