experimental image widget
Closed this issue · 3 comments
Hi, I have created an image widget based on my terminal graphics library (https://github.com/srlehn/termimg). The widget can consume an image stream (video) and does implement image/draw.Image. It is still very experimental.
the implementation is here: https://github.com/srlehn/termimg/blob/master/tui/tcellimg/image.go
test program: go run github.com/srlehn/termimg/cmd/tcell_test@master
This is cool, but I don't think there is any we need from tcell here, right? Nothing actionable?
I intended to ask about some issues I encountered while implementing the widget but forgot about it...
In around a week I should have some time to write it down here.
I embedded views.Cellview into my Image struct to implement the views.Widget interface. For the model I used the linesModel from views.TextArea. Is there an easier way to have views.Widget implemented?
My library needs to consume the terminal output but that results in missed keystrokes in tcell. A copy of this stream as an io.Reader like Tty.Read() would be great.
Is CSI 14t used somewhere as a fallback for TIOCGWINSZ for measuring the pixel size of the terminal?