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)
|
fmt.Printf("q=2,a=T,f=32,s=%d,v=%d,", width, height)
|
||||||
first = false
|
first = false
|
||||||
}
|
}
|
||||||
remaining := len(encoded) - pos
|
chunk_len := len(encoded) - pos
|
||||||
chunk_len := remaining
|
|
||||||
if chunk_len > chunk_size {
|
if chunk_len > chunk_size {
|
||||||
chunk_len = chunk_size
|
chunk_len = chunk_size
|
||||||
}
|
}
|
||||||
if pos+chunk_len < len(encoded) {
|
if pos+chunk_len < len(encoded) {
|
||||||
fmt.Print("m=1;")
|
fmt.Print("m=1")
|
||||||
} else {
|
|
||||||
fmt.Print(";")
|
|
||||||
}
|
}
|
||||||
fmt.Print(encoded[pos : pos+chunk_len])
|
fmt.Printf(";%s\033\\", encoded[pos:pos+chunk_len])
|
||||||
fmt.Print("\033\\")
|
|
||||||
pos += chunk_len
|
pos += chunk_len
|
||||||
}
|
}
|
||||||
fmt.Print("\033[u")
|
fmt.Print("\033[u")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user