Closed diamondburned closed 1 year ago
With the current changes in my branch, I was able to make a working SIXEL implementation with GIF support.
Hi! Is there any plans on moving forward with integrating this? I've started looking into adding image viewing to aerc which uses tcell-term and according to the author, the easiest would be if tcell
would support it directly, because otherwise it will be a bit hacky.
I haven't looked at this in quite a while. I'll need some time to re-review it.
My biggest complaints right now with these relate to a couple of areas of concern:
Anyway, I'll look again, maybe with a fresh perspective.
I've reviewed the PR for this, and had some thoughts. It needs work before it can land, and some of it needs changes in approach, because SIXEL doesn't really work for all terminals -- it is linked intrinsically to the model of a stream of bytes and escape sequences, and that isn't how some of the targets we support work (neither Windows console nor the new HTML terminal widget).
I think that there are however ways forward to achieve what is desired here, in a way that doesn't lead to unacceptable compromises. My notes on that are in the PR.
Note that the approach discussed here doesn't actually offer full SIXEL support, but merely exposes some things that make it possible for a SIXEL library to coexist with tcell.
Thanks for looking into this!
Is it possible to draw sixel image with transparency?
I actually think the PR to enable this was merged already. I don't know whether transparency is possible here but I sort of doubt it.
Closing since https://github.com/gdamore/tcell/pull/602 is merged.
Recently, many new, modern terminals are popping up with decent SIXEL support, and with VTE's SIXEL branch coming closer to being ready, I've been thinking of various ways of adding SIXEL graphics through tcell to ultimately make an image widget in tview; however, I'm making an issue first to see how such a thing should be best implemented.
My current idea involves these interfaces:
They have a problem, however. Callbacks may call methods on Screen, which would cause a deadlock, because the lock would already be acquired in
draw()
calls, which is where these callbacks are executed. I'm currently thinking of using a halting mutex (mutex that allows invalidation of its methods temporarily while it's acquired), but this seems hacky.The idea of unlocking and relocking may seem fine at first, but it will lead to excessive graphical blinking.
The ultimate use case of this type of API would be drawing SIXEL graphics onto tcell applications, like so:
For the record, this image is rendered on the foot terminal using my current prototype branch.