mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
examples/keyboard: Use image.Decode instead of png.Decode
This commit is contained in:
parent
0ad12e65df
commit
08beed4306
@ -18,7 +18,8 @@ package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"image/png"
|
||||
"image"
|
||||
_ "image/png"
|
||||
"log"
|
||||
"strconv"
|
||||
|
||||
@ -35,7 +36,7 @@ const (
|
||||
var keyboardImage *ebiten.Image
|
||||
|
||||
func init() {
|
||||
img, err := png.Decode(bytes.NewReader(rkeyabord.Keyboard_png))
|
||||
img, _, err := image.Decode(bytes.NewReader(rkeyabord.Keyboard_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user