|
|
|
@ -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:
|
|
|
|
|
}
|
|
|
|
|