Real-image posters: scale and encode in the background
Done in Draw it took about 200 ms per new poster (BiLinear scale to the box plus PNG encoding), so each step to another title stalled the UI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -245,6 +245,12 @@ func New(cfg *config.Config) *App {
|
||||
func (a *App) newGraphics() *kittyGraphics {
|
||||
k := newKittyGraphics(a.writeTerminal)
|
||||
k.cellPixels = func() (int, int) { return a.cellW, a.cellH }
|
||||
k.background = func(prepare func() prepared, ready func(prepared)) {
|
||||
go func() {
|
||||
p := prepare()
|
||||
a.post(func() { ready(p) })
|
||||
}()
|
||||
}
|
||||
switch v := os.Getenv("ARR_TUI_DEBUG_GFX"); {
|
||||
case v == "":
|
||||
case strings.Contains(v, "/"):
|
||||
|
||||
Reference in New Issue
Block a user