mirror of
https://github.com/talgo-cloud/talgo-libwebp.git
synced 2026-03-07 21:48:16 -08:00
Update examples.
This commit is contained in:
parent
fff8a5bbce
commit
6608fdcc01
2 changed files with 10 additions and 10 deletions
13
README.md
13
README.md
|
|
@ -4,7 +4,11 @@ go-libwebp
|
|||
[](https://travis-ci.org/harukasan/go-libwebp)
|
||||
[](https://godoc.org/github.com/harukasan/go-libwebp/webp)
|
||||
|
||||
A implementation of Go binding for [libwebp](https://developers.google.com/speed/webp/docs/api) written with cgo.
|
||||
A implementation of Go binding for [libwebp](https://developers.google.com/speed/webp/docs/api).
|
||||
|
||||
## Dependencies
|
||||
|
||||
- libwebp 0.4, 0.5
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
@ -63,10 +67,7 @@ func main() {
|
|||
io.Close()
|
||||
}()
|
||||
|
||||
config := webp.Config{
|
||||
Preset: webp.PresetDefault,
|
||||
Quality: 90,
|
||||
}
|
||||
config := webp.ConfigPreset(webp.PresetDefault, 90)
|
||||
|
||||
// Encode into WebP
|
||||
if err := webp.EncodeRGBA(w, img.(*image.RGBA), config); err != nil {
|
||||
|
|
@ -82,7 +83,7 @@ func main() {
|
|||
|
||||
## License
|
||||
|
||||
Copyright (c) 2014 MICHII Shunsuke. All rights reserved.
|
||||
Copyright (c) 2016 MICHII Shunsuke. All rights reserved.
|
||||
|
||||
This library is released under The BSD 2-Clause License.
|
||||
See [LICENSE](./LICENSE).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue