all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Implementing image support for kitty terminal
@ 2022-09-10 10:15 xenodasein--- via Emacs development discussions.
  2022-09-10 10:38 ` Eli Zaretskii
  0 siblings, 1 reply; 81+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-09-10 10:15 UTC (permalink / raw)
  To: emacs-devel

Are you considering to change the text terminal infrastructure for
Emacs just to accommodate one wayward desktop app that claims to be
a terminal and a Kindle at the same time?  Isn't frame handling
already Frankenstein-ized enough between mixing graphical and text
modes?  Wouldn't it be better to focus on how to solve that instead;
supporting singular apps would then become much easier.




^ permalink raw reply	[flat|nested] 81+ messages in thread
* Implementing image support for kitty terminal
@ 2022-09-07 15:50 Jose Antonio Ortega Ruiz
  2022-09-07 17:10 ` Tomas Hlavaty
                   ` (2 more replies)
  0 siblings, 3 replies; 81+ messages in thread
From: Jose Antonio Ortega Ruiz @ 2022-09-07 15:50 UTC (permalink / raw)
  To: emacs-devel


Hi,

The kitty terminal emulator (which runs under X11 and wayland) offers a
simple protocol for displaying images, fully described at
<https://sw.kovidgoyal.net/kitty/graphics-protocol/>.  

In a nutshell, it accepts an escape sequence that make it enter "graphic
mode", followed by either encoded image data or a path to an image file
or a shared memory location to display.  Among several other niceties,
the protocol allows drawing to rectangles specified in cell units. As a
simple example, the sequence:

   <ESC>_Gf=100,t=f,c=50,r=100;<encoded /path/to/file.png><ESC>\

would make kitty draw the image in file.png rescaling it to 50 columns
and 100 rows.  By default, the current cursor position is used, but it's
also possible to specify pixel offsets and sizes.

At first sight, it looks as if adding support for this protocol to
emacs's tty terminal (when kitty, or the capability (it seems other
terminals support the same protocol) is detected) shouldn't be too
complex, and with that, perhaps, provide direct support for the
elisp-level image- API for these terminals (so that, for instance,
doc-view or pdf-tools or displaying images in eww buffers would work out
of the box).  Am i wrong?

On a personal note, if that were possible it would put emacs on a kitty
terminal on the same league as the full graphical version for my needs,
with the added benefit of dramatically reduced RAM footprint, faster
display and, last but not least, a truly great alternative to pgtk in
wayland.  So, if the implementation is feasible, i'd be willing to help
if needed.

Thanks,
jao
-- 
千里之行始於足下
The journey of a thousand miles begins with a single step.
  — 老子 (Lao Tsu) in Chapter 64 of 道德经 (Tao Te Ching)



^ permalink raw reply	[flat|nested] 81+ messages in thread

end of thread, other threads:[~2022-09-10 19:52 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-10 10:15 Implementing image support for kitty terminal xenodasein--- via Emacs development discussions.
2022-09-10 10:38 ` Eli Zaretskii
2022-09-10 11:06   ` xenodasein--- via Emacs development discussions.
2022-09-10 11:13   ` Akib Azmain Turja
  -- strict thread matches above, loose matches on Subject: below --
2022-09-07 15:50 Jose Antonio Ortega Ruiz
2022-09-07 17:10 ` Tomas Hlavaty
2022-09-07 18:11 ` Eli Zaretskii
2022-09-07 18:49   ` Jose A Ortega Ruiz
2022-09-07 19:41     ` Eli Zaretskii
2022-09-07 20:09       ` Jose A Ortega Ruiz
2022-09-08  6:51         ` Eli Zaretskii
2022-09-07 20:11       ` Stefan Monnier
2022-09-08  5:30         ` Eli Zaretskii
2022-09-08 12:47         ` Gerd Möllmann
2022-09-08 13:54           ` Eli Zaretskii
2022-09-08 14:03             ` Gerd Möllmann
2022-09-08 14:24               ` Gerd Möllmann
2022-09-08 16:04                 ` Eli Zaretskii
2022-09-09  4:59                   ` Gerd Möllmann
2022-09-09 12:19                   ` Stefan Monnier
2022-09-09 12:53                     ` Eli Zaretskii
2022-09-09 12:59                     ` Gerd Möllmann
2022-09-09 13:17                       ` tomas
2022-09-09 14:10                         ` Gerd Möllmann
2022-09-09 14:20                           ` Eli Zaretskii
2022-09-09 14:27                             ` Gerd Möllmann
2022-09-09 15:12                               ` Stefan Monnier
2022-09-10  7:52                                 ` Gerd Möllmann
2022-09-10  8:06                           ` Kyaw Thu Soe
2022-09-09 13:27                       ` Stefan Monnier
2022-09-08 16:00               ` Eli Zaretskii
2022-09-09  4:58                 ` Gerd Möllmann
2022-09-07 18:56   ` Tomas Hlavaty
2022-09-07 19:51     ` Eli Zaretskii
2022-09-08 18:30       ` Tomas Hlavaty
2022-09-08 18:45         ` Eli Zaretskii
2022-09-08 19:45           ` Tomas Hlavaty
2022-09-08 20:33             ` Jose A Ortega Ruiz
2022-09-08 20:29         ` Jose A Ortega Ruiz
2022-09-08 20:52           ` Tomas Hlavaty
2022-09-08 21:47             ` Jose A Ortega Ruiz
2022-09-08 22:21               ` Óscar Fuentes
2022-09-08 22:46                 ` Tomas Hlavaty
2022-09-09  5:48                 ` Jose A Ortega Ruiz
2022-09-08 22:43               ` Tomas Hlavaty
2022-09-08 23:32                 ` Jose A Ortega Ruiz
2022-09-09  1:43                   ` Po Lu
2022-09-09  5:52                     ` Jose A Ortega Ruiz
2022-09-09  7:25                       ` Po Lu
2022-09-09  6:06                   ` Eli Zaretskii
2022-09-09  6:21                     ` Jose A Ortega Ruiz
2022-09-09  6:43                       ` Eli Zaretskii
2022-09-09 14:56                         ` Jose A Ortega Ruiz
2022-09-09 15:20                           ` chad
2022-09-09 15:34                             ` Jose A Ortega Ruiz
2022-09-10  2:56                               ` Tomas Hlavaty
2022-09-10  3:35                                 ` Visuwesh
2022-09-10  6:01                                   ` Tomas Hlavaty
2022-09-10  6:51                                     ` Po Lu
2022-09-10 19:52                                       ` Tomas Hlavaty
2022-09-09 15:25                           ` Stefan Monnier
2022-09-09 16:15                           ` Eli Zaretskii
2022-09-10  0:45                             ` Jose A Ortega Ruiz
2022-09-10  6:15                               ` Eli Zaretskii
2022-09-09  1:41               ` Po Lu
2022-09-09  5:53                 ` Jose A Ortega Ruiz
2022-09-09  1:40           ` Po Lu
2022-09-09  5:56             ` Jose A Ortega Ruiz
2022-09-07 19:59     ` Jose A Ortega Ruiz
2022-09-08 11:13       ` Akib Azmain Turja
2022-09-08 13:25         ` Jose A Ortega Ruiz
2022-09-08 19:26         ` Tomas Hlavaty
2022-09-08 19:15       ` Tomas Hlavaty
2022-09-08 19:30         ` Eli Zaretskii
2022-09-08 20:03           ` Tomas Hlavaty
2022-09-09  5:43             ` Eli Zaretskii
2022-09-10  3:02               ` Tomas Hlavaty
2022-09-08 10:59     ` Akib Azmain Turja
2022-09-08 13:44       ` Eli Zaretskii
2022-09-08  9:13 ` Akib Azmain Turja
2022-09-08 19:31   ` Tomas Hlavaty

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.