Skip to content

Commit

Permalink
chore(cmd): Change image.Decode to png.Decode when setting window…
Browse files Browse the repository at this point in the history
… icon
  • Loading branch information
gabe565 committed Mar 24, 2024
1 parent dc9245c commit 37eab74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cmd/gones/get_icons.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package gones

import (
"image"
"image/png"
"io/fs"

"github.com/gabe565/gones/assets"
Expand All @@ -25,7 +26,7 @@ func getWindowIcons() []image.Image {
_ = f.Close()
}(f)

icon, _, err := image.Decode(f)
icon, err := png.Decode(f)
if err != nil {
log.WithError(err).Error("Failed to decode icon")
return nil
Expand Down
6 changes: 1 addition & 5 deletions cmd/gones/window_icon.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

package gones

import (
_ "image/png"

"github.com/hajimehoshi/ebiten/v2"
)
import "github.com/hajimehoshi/ebiten/v2"

//nolint:gochecknoinits
func init() {
Expand Down

0 comments on commit 37eab74

Please sign in to comment.