initial commit

This commit is contained in:
harukasan 2015-01-09 12:51:34 +09:00
commit 5af6d93b3b
26 changed files with 1165 additions and 0 deletions

22
examples/decode/decode.go Normal file
View file

@ -0,0 +1,22 @@
package main
import (
"github.com/harukasan/go-libwebp/examples/util"
"github.com/harukasan/go-libwebp/webp"
)
func main() {
var err error
// Read binary data
data := util.ReadFile("cosmos.webp")
// Decode
options := &webp.DecoderOptions{}
img, err := webp.DecodeRGBA(data, options)
if err != nil {
panic(err)
}
util.WritePNG(img, "encoded_cosmos.png")
}