context attempt
All checks were successful
build rgb-board / build (push) Successful in 7m57s

This commit is contained in:
2024-02-15 23:21:09 +00:00
parent 81e7607d53
commit 6eec19644e
3 changed files with 9 additions and 10 deletions

View File

@@ -6,18 +6,17 @@ import (
"image"
"github.com/disintegration/imaging"
"github.com/fogleman/gg"
)
type Doorbell struct {
image image.Image
}
func (a *Animation) clearDoorbell() {
var door Doorbell
a.doorbell = door
}
func loadImage(imgType string, img string, a *Animation) {
baseImage, _ := b64.StdEncoding.DecodeString(img)
bigImage, _, _ := image.Decode(bytes.NewReader(baseImage))
a.doorbell.image = imaging.Resize(bigImage, 64, 64, imaging.Lanczos)
a.ctx.Push()
a.ctx = gg.NewContext(64, 128)
}