Skip to content

Commit

Permalink
Fix w/h variables for ascii streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed May 16, 2024
1 parent 6d967bc commit 2929db9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/ascii/ascii.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 2929db9

Please sign in to comment.