Replies: 5 comments
-
On Wed Sep 11, 2024 at 7:38 AM CDT, Ratakor wrote:
Support [sixel](https://saitoha.github.io/libsixel/) format for images.
This can be useful on terminal that don't support kitty graphics but support sixel.
I am very much on the fence about supporting sixels, and leaning towards not
supporting them. My preference for these terminals would be to support
half-block rendering of images. Yes, the fidelity will greatly suffer however
bringing in sixel support is not a small task. Libsixel is not very performant
(perhaps that has improved), and I'm hesitant to bring in a C lib on top of that
because right now we don't require linking libc.
The very first step would be having a crossplatform zig library that encodes
images to sixels.
I'll keep this issue open for discussion.
|
Beta Was this translation helpful? Give feedback.
-
I can offer my library that I wrote because I saw this message, at the moment it is implemented in C, but for those who know Zig it will not be difficult to port it. |
Beta Was this translation helpful? Give feedback.
-
@seityaya This is looking really good. Do you have any benchmarks compared to libsixel? I know dnkl in particular has been critical of libsixel's performance, and such a simple library in C would be greatly appreciated in many projects. |
Beta Was this translation helpful? Give feedback.
-
@rockorager I have not compared the performance of the algorithm with other implementations. In the gif example, a raw 400 by 400 24-bit rgb image is converted to a sixel sequence in one core in ̶0̶.̶1̶ ̶s̶e̶c̶o̶n̶d̶s̶ ̶o̶r̶ ̶1̶0̶ ̶i̶m̶a̶g̶e̶s̶ ̶p̶e̶r̶ ̶s̶e̶c̶o̶n̶d̶. Depending on the palette and the size of the image, this figure can vary widely. release on and optimisation last commit |
Beta Was this translation helpful? Give feedback.
-
@rockorager Would you be willing to accept something like Chafa instead? I found out about this through dnkl's post on Treehouse https://social.treehouse.systems/@dnkl/113519559551012343 :P |
Beta Was this translation helpful? Give feedback.
-
Support sixel format for images.
This can be useful on terminal that don't support kitty graphics but support sixel.
Beta Was this translation helpful? Give feedback.
All reactions