mirror of
https://github.com/talgo-cloud/talgo-libwebp.git
synced 2026-03-16 18:55:58 -07:00
Support lossless encoder
This commit is contained in:
parent
116fab839a
commit
9b5030f910
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_size = C.int(c.TargetSize)
|
||||||
config.target_PSNR = C.float(c.TargetPSNR)
|
config.target_PSNR = C.float(c.TargetPSNR)
|
||||||
|
if c.Lossless {
|
||||||
|
config.lossless = C.int(1)
|
||||||
|
}
|
||||||
|
|
||||||
if C.WebPValidateConfig(config) == 0 {
|
if C.WebPValidateConfig(config) == 0 {
|
||||||
return nil, errors.New("Invalid configuration")
|
return nil, errors.New("Invalid configuration")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue