examples/keyboard: Use image.Decode instead of png.Decode

This commit is contained in:
Hajime Hoshi 2018-03-14 12:11:11 +09:00
parent 0ad12e65df
commit 08beed4306

View File

@ -18,7 +18,8 @@ package main
import ( import (
"bytes" "bytes"
"image/png" "image"
_ "image/png"
"log" "log"
"strconv" "strconv"
@ -35,7 +36,7 @@ const (
var keyboardImage *ebiten.Image var keyboardImage *ebiten.Image
func init() { func init() {
img, err := png.Decode(bytes.NewReader(rkeyabord.Keyboard_png)) img, _, err := image.Decode(bytes.NewReader(rkeyabord.Keyboard_png))
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }