maxini optimalizini
This commit is contained in:
parent
42ee1bd41c
commit
e759f8f1ba
@ -52,18 +52,14 @@ func RenderImage(filepath string, row int, col int) {
|
||||
fmt.Printf("q=2,a=T,f=32,s=%d,v=%d,", width, height)
|
||||
first = false
|
||||
}
|
||||
remaining := len(encoded) - pos
|
||||
chunk_len := remaining
|
||||
chunk_len := len(encoded) - pos
|
||||
if chunk_len > chunk_size {
|
||||
chunk_len = chunk_size
|
||||
}
|
||||
if pos+chunk_len < len(encoded) {
|
||||
fmt.Print("m=1;")
|
||||
} else {
|
||||
fmt.Print(";")
|
||||
fmt.Print("m=1")
|
||||
}
|
||||
fmt.Print(encoded[pos : pos+chunk_len])
|
||||
fmt.Print("\033\\")
|
||||
fmt.Printf(";%s\033\\", encoded[pos:pos+chunk_len])
|
||||
pos += chunk_len
|
||||
}
|
||||
fmt.Print("\033[u")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user