From 94cfad1190961407e672913a2c742ab0216a1fef Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Fri, 12 Jan 2024 01:50:05 +0000 Subject: [PATCH] removing old image array --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index d40fa3b..551fdef 100644 --- a/main.go +++ b/main.go @@ -127,17 +127,18 @@ func NewAnimation(sz image.Point, mqMessages chan mqtt.Message) *Animation { log.Fatal(err) } rawMario, _, err = image.Decode(reader) + if err != nil { + log.Fatal(err) + } //marioDown := imaging.FlipH(imaging.Resize(rawMario, 16, 16, imaging.Lanczos)) marioDown := imaging.Resize(rawMario, 16, 16, imaging.Lanczos) imageMap["marioDown"] = marioDown - imageSlice := []image.Image{marioUp, marioDown} return &Animation{ ctx: gg.NewContext(sz.X, sz.Y), dir: image.Point{1, 1}, height: 8, width: 8, stroke: 8, - image: imageSlice, images: imageMap, updown: "marioUp", mqmsg: mqMessages,