Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] SIXEL Support #552

Open
Vinfall opened this issue Jun 7, 2024 · 3 comments
Open

[Feature request] SIXEL Support #552

Vinfall opened this issue Jun 7, 2024 · 3 comments

Comments

@Vinfall
Copy link

Vinfall commented Jun 7, 2024

Is your feature request related to a problem? Please describe.

QTerminal seems to be missing SIXEL support.

I'm trying to use lsix, a Bash script using ImageMagick to show thumbnails in terminal using sixel graphics, and it throws a warning about missing libsixel support:

Error: Your terminal does not report having sixel graphics support.

Please use a sixel capable terminal, such as xterm -ti vt340, or
ask your terminal manufacturer to add sixel support.

You may test your terminal by viewing a single image, like so:

convert  foo.jpg  -geometry 800x480  sixel:-

If your terminal actually does support sixel, please file a bug
report at http://github.com/hackerb9/lsix/issues

Please mention device attribute codes: ^[[?1;2c

Manually running the suggested command convert foo.jpg -geometry 800x480 sixel:- only shows random ASCII characters. I've installed libsixel and libsixel-util from package manager (Void glibc, if that matters) and manually run img2sixel foo.jpg provided by libsixel have similar output, hence the issue.

Describe the solution you'd like

Support that if possible, lsix README mentions that Your Terminal must support Sixel graphics which may be useful for a preliminary judgement on this. It talks about xterm or standard libvte based terminals but I really have no clue what's the case of QTerminal.

Describe eventual alternatives you've considered

A wontfix tag is also appreciated if support is not possible. I just want to figure out the problem.

Context

A unofficial mirror of the original sixel is available at https://github.com/saitoha/sixel.
A SIXEL encoder/decoder implementation derived from kmiya's sixel is available at https://github.com/saitoha/libsixel.

I have no idea it's related to qterminal or qtermwidget, and I apologize if I report this in the wrong place.

@marcusbritanicus
Copy link
Contributor

marcusbritanicus commented Jun 7, 2024

SIXEL support needs to be provided by the underlying qtermwidget. I have not found any major guides as to how to addd sixel support.

@tsujan @stefonarch I am working on porting the latest konsole sources to pure Qt. If I understand correctly, Konsole has sixel support. If I succeed in the porting work (I'm at least a couple of months from any reasonable result), we can have sixel support.

PS: I think this issue can be to be moved to qtermwidget

@tsujan
Copy link
Member

tsujan commented Jun 7, 2024

@marcusbritanicus
I have no knowledge in this area. We'll rely on your work. Thanks!

@tsujan tsujan transferred this issue from lxqt/qterminal Jun 7, 2024
@Vinfall
Copy link
Author

Vinfall commented Jun 8, 2024

I have not found any major guides as to how to addd sixel support.

I think so. I notice the libsixel repo I linked in context has lots of implementation and you may find those useful. Generally speaking (as I have no Qt experience), The low-level conversion API (and whole API definition), ite-sixel patch and contour (which is also written in Qt I guess) seem to be the most promising references.

If I understand correctly, Konsole has sixel support. If I succeed in the porting work (I'm at least a couple of months from any reasonable result), we can have sixel support.

Just tested as I already had KDE Connect and Okular along with a bunch of KDE dependencies, I can confirm Konsole supports sixel. I don't mind waiting so keep up the good work!

Edit: suggest sixel implementation references

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants