ainame / Swift-WebP

A thin libwebp wrapper in Swift that provides both encode/decode APIs
MIT License
163 stars 39 forks source link

Changing encoder quality has no effect on the output file #39

Closed matylla closed 5 years ago

matylla commented 5 years ago

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)
matylla commented 5 years ago

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
matylla commented 5 years ago

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.

ainame commented 5 years ago

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