Compare commits

...

2 Commits

Author SHA1 Message Date
2fcf2411b0 Merge branch 'master' of gitea.local:publicWagsHome/rgb-go-test 2023-06-15 04:31:27 +00:00
1fa86357ec arrays start at zero dumbass 2023-06-15 04:30:39 +00:00

View File

@@ -153,7 +153,7 @@ func (a *Animation) Next() (image.Image, <-chan time.Time, error) {
}
if len(a.image) == 3 {
if a.countDown > 0 {
a.ctx.DrawImageAnchored(a.image[3], 0, 0, 0, 0)
a.ctx.DrawImageAnchored(a.image[2], 0, 0, 0, 0)
a.countDown -= 50
} else {
a.image = a.image[:len(a.image)-1]
@@ -171,7 +171,7 @@ func (a *Animation) Next() (image.Image, <-chan time.Time, error) {
baseImage, _ := b64.StdEncoding.DecodeString(incoming.Image)
bigImage, _, _ := image.Decode(bytes.NewReader(baseImage))
a.image = append(a.image, imaging.Resize(bigImage, 32, 32, imaging.Lanczos))
a.ctx.DrawImageAnchored(a.image[3], 0, 0, 0, 0)
a.ctx.DrawImageAnchored(a.image[2], 0, 0, 0, 0)
}
default:
}