From 2929db9cecef3902b95a28cf62c23c10b1d509e5 Mon Sep 17 00:00:00 2001 From: Alex X Date: Thu, 16 May 2024 22:01:57 +0300 Subject: [PATCH] Fix w/h variables for ascii streaming --- pkg/ascii/ascii.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/ascii/ascii.go b/pkg/ascii/ascii.go index c75d7f88..00d2f6dd 100644 --- a/pkg/ascii/ascii.go +++ b/pkg/ascii/ascii.go @@ -111,11 +111,11 @@ func (a *writer) Write(p []byte) (n int, err error) { a.buf = a.buf[:len(csiHome)] - w := img.Bounds().Dy() - h := img.Bounds().Dx() + w := img.Bounds().Dx() + h := img.Bounds().Dy() - for y := 0; y < w; y++ { - for x := 0; x < h; x++ { + for y := 0; y < h; y++ { + for x := 0; x < w; x++ { r, g, b, _ := img.At(x, y).RGBA() if a.color != nil { a.color(uint8(r>>8), uint8(g>>8), uint8(b>>8))