diff --git a/webp/encode.go b/webp/encode.go index 4ca42f4..17482b0 100644 --- a/webp/encode.go +++ b/webp/encode.go @@ -131,6 +131,9 @@ func initConfig(c Config) (config *C.WebPConfig, err error) { } config.target_size = C.int(c.TargetSize) config.target_PSNR = C.float(c.TargetPSNR) + if c.Lossless { + config.lossless = C.int(1) + } if C.WebPValidateConfig(config) == 0 { return nil, errors.New("Invalid configuration")