mirror of
https://github.com/talgo-cloud/talgo-libwebp.git
synced 2026-03-07 21:48:16 -08:00
Merge pull request #5 from saturday06/feature/lossless_encoder
Support lossless encoder.
This commit is contained in:
commit
0d036bec4c
1 changed files with 3 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue