carbonyl icon indicating copy to clipboard operation
carbonyl copied to clipboard

Consider Sixel Support

Open ghost opened this issue 2 years ago • 13 comments

I think this is an amazing project! The only problem are images and some UI elements that need some rendering. I think sixel might be the best alternative, it's pretty lightweight and has support on a lot of terminals.

ghost avatar Jan 28 '23 18:01 ghost

I came here to say exactly the same thing, this would actually be a very viable terminal based web browser if it had support for DEC's Sixel standard that they produced for the VT200 and VT300 series terminals in the 1980s, short for "six pixels", it is a bitmap graphics format supported by the industry standard VT220 terminal type. It should be trivial to add native sixel support into carbonyl using the work of the libsixel project. https://github.com/saitoha/libsixel

I don't have any time to help right now but I can really see the value of a Crome based terminal browser that has proper sixel support, especially in the world of infrastructure management where you can't typically access a GUI at the remote end to do things like launch a web browser within the local environment to work with stupid things like Jenkins CI/CD pipelines.

Technical References: https://www.vt100.net/docs/vt3xx-gp/chapter14.html https://www.digiater.nl/openvms/decus/vax90b1/krypton-nasa/all-about-sixels.text

$ brew install libsixel

sixel

nbritton avatar Feb 06 '23 00:02 nbritton

YES! That would be wonderful! Sixel is supported on all three major platforms:

  • Windows (mintty via Cygwin)
  • Linux (mlterm)
  • MacOS (iTerm2)

chrispollitt avatar Feb 06 '23 03:02 chrispollitt

YES! That would be wonderful! Sixel is supported on all three major platforms:

  • Windows (mintty via Cygwin)
  • Linux (mlterm)
  • MacOS (iTerm2)

Also, there are a lot of alternatives, I use foot terminal for example. More supported terminals can be found here.

ghost avatar Feb 08 '23 12:02 ghost

I was under the impression that any terminal that is fully compliant with the DEC VT220 terminal standard has native support for Sixel. It's basically just some clever use of ANSI escape sequences from what I recall.

From Wikipedia:

image image

nbritton avatar Feb 08 '23 13:02 nbritton

https://www.arewesixelyet.com/

aicynide avatar Feb 08 '23 23:02 aicynide

Imagine developing a terminal browser and not aware about sixel

aicynide avatar Feb 08 '23 23:02 aicynide

I originally planned to add a SIXEL back-end (some work in src/output/quantizer.rs), but ended up not focusing on it as the terminal support is poor for a realtime use-case (at least on macOS). For example, iTerm2 writes each SIXEL frame into a file in /tmp and displays it using an image view. Someone shared alacritty-sixel which seems like a good playground for that.

I'm planning on releasing a separate software to render any Wayland app to SIXEL such as Firefox, which would remove the need to depend on a Chromium fork.

fathyb avatar Feb 09 '23 00:02 fathyb

A new renderer landed in the main branch. Still no SIXEL, but works almost everywhere hehe:

$ docker run -ti -e COLORTERM=24bit fathyb/carbonyl:next https://youtube.fr/ --zoom=300 --bitmap

https://user-images.githubusercontent.com/5746414/218641639-4520bcd4-8a66-4d1f-aca1-d2d5bb148bb0.mp4

fathyb avatar Feb 14 '23 04:02 fathyb

Isn't that cheating (using one character per pixel and reducing the font size to 1px or so so it's not a giant mess) ?

X-Ryl669 avatar Mar 13 '23 11:03 X-Ryl669

Hi,

I'm Mr. You, a very friendly guy.

I also support the idea of sixel graphics for carbonyl.

Actually the sixel concept could probably be improved. It's a bit slow and I don't really believe in the idea of using escape characters. But until Terminals can conveniently display graphics some other way natively I'd say sixel support might be a good idea.

bitcoinmeetups avatar Nov 03 '23 01:11 bitcoinmeetups

What about this software to "render all wayland apps to sixel"? Sounds like something I would be interested in. Although I use xfce4, not wayland.

bitcoinmeetups avatar Nov 03 '23 06:11 bitcoinmeetups

I just found this project, trying to get rid of all browser/electron/GUI apps and slowing adding all CLI/TUI apps for matrix,invidious,mastodon,peertube,irc,gopher,email,gemini,usenet etc ... and I think this has a lot of potention but the first thing that came to my mind is .. "do this guys know there is sixel" and found this, so yes sixel will be awesome!

r3k2 avatar Apr 06 '24 22:04 r3k2