mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +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 (
|
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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user