[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Implementing image support for kitty terminal
From: |
Akib Azmain Turja |
Subject: |
Re: Implementing image support for kitty terminal |
Date: |
Thu, 08 Sep 2022 16:59:53 +0600 |
Tomas Hlavaty <tom@logand.com> writes:
> On Wed 07 Sep 2022 at 21:11, Eli Zaretskii <eliz@gnu.org> wrote:
>> In particular, the current model of image display
>> in the Emacs display engine is that an image is basically considered a
>> single very large character, from the screen layout POV.
>
> Are you talking about GUI emacs?
> Is that not different in tty emacs?
> I thought that the tty emacs has no concept of image (so far?).
Yes. There is no image in text terminals.
>
>> I guess
>> that's not what you have in mind for the above, so IMO it's important
>> to come up with an alternative model that would somehow fit with the
>> current display code with only minor changes, if we want this not to
>> be too complex.
>
> For example, the tty based w3m web browser optionally supports images.
> It reserves space w*h chars on the tty and then uses external program
> to draw the image in the right place.
>
> I guess tty emacs would also need to reserve a w*h chars rectangle on
> the tty and then send the right escape code to fill that gap with the
> image.
>
> First, tty emacs would need to understand images instead of throwing
> error. At least their dimensions. Maybe using some library or even in
> elisp, for example like this
> https://logand.com/sw/emacs-framebuffer/file/emacs-framebuffer.el.html#l286
> I have not figured out, how to actually plug it into upstream emacs, as
> this seems to require a lot of changes to C code.
>
> Second, tty emacs would need to somehow reserve rectangle for the image.
> This might be lots of work I guess.
>
> Third, there would have to be a piece of code which actually draws the
> image. In case of kitty terminal, the image path and coordinates would
> be sent to the tty using the kitty terminal protocol. In case of Linux
> console, the image path and coordinates would be sent to an external
> program like w3mimgdisplay.
>
--
Akib Azmain Turja
Find me on Mastodon at @akib@hostux.social.
This message is signed by me with my GnuPG key. Its fingerprint is:
7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
signature.asc
Description: PGP signature
- Re: Implementing image support for kitty terminal, (continued)
- Re: Implementing image support for kitty terminal, Jose A Ortega Ruiz, 2022/09/09
- Re: Implementing image support for kitty terminal, Jose A Ortega Ruiz, 2022/09/07
- Re: Implementing image support for kitty terminal, Akib Azmain Turja, 2022/09/08
- Re: Implementing image support for kitty terminal, Jose A Ortega Ruiz, 2022/09/08
- Re: Implementing image support for kitty terminal, Tomas Hlavaty, 2022/09/08
- Re: Implementing image support for kitty terminal, Tomas Hlavaty, 2022/09/08
- Re: Implementing image support for kitty terminal, Eli Zaretskii, 2022/09/08
- Re: Implementing image support for kitty terminal, Tomas Hlavaty, 2022/09/08
- Re: Implementing image support for kitty terminal, Eli Zaretskii, 2022/09/09
- Re: Implementing image support for kitty terminal, Tomas Hlavaty, 2022/09/09
- Re: Implementing image support for kitty terminal,
Akib Azmain Turja <=
- Re: Implementing image support for kitty terminal, Eli Zaretskii, 2022/09/08
Re: Implementing image support for kitty terminal, Akib Azmain Turja, 2022/09/08
Re: Implementing image support for kitty terminal, xenodasein, 2022/09/10