This is a fork with various improvements and security patches. Hayaki Saito, the project's originator and long-time maintainer, disappeared in 1/2020. It's unknown what happened to him, he no longer even posts on Twitter. This is a continuation by the community. Fredrick R. Brennan (@ctrlcctrlv) is lead maintainer. For more information see saitoha/libsixel issue №154.
This package provides a C encoder/decoder implementation for DEC SIXEL graphics in the libsixel.so
shared library, and two converter programs, img2sixel
and sixel2png
.
(https://youtu.be/0SasrQ7pnbA)
SIXEL is one of image formats for printer and terminal imaging introduced by Digital Equipment Corp. (DEC). Its data scheme is represented as a terminal-friendly escape sequence. So if you want to view a SIXEL image file, all you have to do is "cat" it to your terminal.
On 80's real hardware terminals, it tooks unbearable long waiting times to display images.
But nowdays, with high-speed CPU and broadband network, we got the chance broaden the scope of SIXEL graphics.
img2sixel(1)
can decode GIF animations as well.
-
Recent versions of gnuplot support the new terminal driver "sixeltek(sixel)" / "sixelgd".
-
You can emit SIXEL images with LN03 / LN50 / LA75 driver.
example:
$ gs -q -r100x -dBATCH -dNOPAUSE -sDEVICE=ln03 -sOutputFile=- tiger.eps
-
Recent version of ImageMagick provides SIXEL coder. It's also available over commandline tools.
Now Youtube video streaming is available over SIXEL protocol by FFmpeg-SIXEL project.
Above demo only uses 16 color registers.
SDL1.2-SIXEL project makes enable you to operate various GUI applications on the terminal.
You can play "The Battle for Wesnoth
" over SIXEL protocol.
You can run QEMU on SIXEL terminals.
SDL1.2-SIXEL can collaborate with XSDL-SIXEL.
Furthermore some information of SIXEL-ready SDL applications are reported.
img2sixel(1)
can be integrated with Debian's w3m(maintained by Tatsuya Kinoshita) that includes patches for -sixel option derived from code by @arakiken (w3m remoteimg
branch).
@uobikiemukot's sdump project selected another approach. He wrote a w3mimgdisplay compatible program yaimg-sixel. It also works with ranger.
Xsixel is a kdrive server implementation for SIXEL terminals.
Arakiken's GNU Screen fork(sixel branch) works with SIXEL-supported applications including above products. This project is now in progress. GUI flavored SIXEL applications will integrated with existing terminal applications on it.
See also on youtube.
Some NetBSD/OpenBSD users are doing challenging work, showing that SIXEL graphics work on old low-powered machines such as:
NetBSD/luna68k (here is OMRON LUNA-II):
NetBSD/hp300 (here is HP9000/425e):
OpenBSD/luna88k (here is OMRON LUNA-88K2 MC88100@33MHz):
sayaka-chan(PHP version) works with libsixel inline-image extension.
SIXEL works with old powerless machines such as NetBSD/x68k (here is SHARP X68030 with 060turbo):
SIXEL works even in-kernel console. @isaki68k wrote a patch for ite(4).
Includes 2 commands fricas2sixel and latex2sixel.
Now sixel
backend is implemented.
See https://github.com/dylanaraps/neofetch/wiki/Image-Backends#sixel
Depends on sixel-sys, --converter=sixel
option is supported.
Simple scripts and development environment for realtime edit-previewing for dot, svg, markdown, ...etc.
A sixel image dumper, provides pdf previewer.
SIXEL video driver is provided if you build it with --enable-sixel
option.
(screenshot)
For even more, see Projects using SIXEL.md
.
Former sixel encoders(such as ppmtosixel) are mainly designed for dot-matrix printers. They minimize the amount of printer-head movement distance. But nowadays this method did not represent the best performance for displaying sixel data on terminal emulators. SIXEL data for terminals were found in 80's Usenet, but the technology of how to create them seems to be lost. kmiya's sixel introduces the encoding method which is re-designed for terminal emulators to optimize the overhead of transporting SIXEL with keeping compatibility with former SIXEL terminal. Now libsixel and ImageMagick's sixel coder follow it.
@arakiken, known as the maintainer of mlterm, describes about the way to generate high quality SIXEL, which is adopted by libsixel (https://mlterm.sourceforge.net/libsixel.pdf, in Japanese).
img2sixel(1)
supports color image quantization. It works well even if few number of colors are allowed.
If you want to view a SIXEL image, you have to get a terminal which support sixel graphics. Many terminals have support, such as mlterm
and iTerm2
. xterm
is a commonly installed Linux terminal with support if ran as xterm -xrm "XTerm*decTerminalID: vt340" -xrm "XTerm*numColorRegisters: 256"
. For a complete list of supported terminals, see Supported terminals.md
.
You can install libsixel via the following package systems.
- FreeBSD ports
- DPorts
- pkgsrc
- Homebrew
- yacp
- Debian
- Arch Linux
- Portage
- Ubuntu
- NixOS
- OpenBSD Ports
- Fedora Copr
- SlackBuilds
As of libsixel 2.0, Meson is used to build, not GNU Autotools.
$ meson setup build
$ meson install -C build
You can use the following options at build time to influence the build. During the meson build
step, pass e.g. -Dlibcurl=enabled
to enable cURL.
Option name | Former GNU Autotools equivalent | Description | Default? |
---|---|---|---|
img2sixel | --enable-img2sixel |
Build binary img2sixel |
Yes |
sixel2png | --enable-sixel2png |
Build binary sixel2png |
Yes |
gdk-pixbuf2 | --with-gdk-pixbuf2 |
Whether to build in gdk-pixbuf2 support | No |
gd | --with-gd |
Whether to build in gd support (adds more image formats) | Auto |
libcurl | --with-libcurl |
build with cURL (allows input filenames to binaries/API to be URLs) | No |
jpeg | --with-jpeg |
Whether to build with libjpeg support | Auto |
png | --with-png |
Whether to build with libpng support | Auto |
gcov | --enable-gcov |
Build gcov coverage tests | No |
tests | --enable-tests |
Build tests (requires bash ) |
No |
python3 | --enable-python |
Build Python library integration | No |
pkg_config_path | --with-pkgconfigdir |
pkg-config search directory |
Set by Meson |
As well, several directories can be configured, most importantly prefix
. Non-standard directories you can change are bashcompletiondir
and zshcompletiondir
.
Note: Before libsixel 2.0, Python was installed by default. This was disabled because it requires root on most systems for the Python module to be discoverable. Pass -Dpython3=enabled
to install it.
The following three example projects are distributed in the examples/
directory:
OpenGL example suggests how to port your OpenGL application to a SIXEL-supporting terminal.
Drawing example suggests how to implement drawing with the mouse in SIXEL-supporting terminals.
Python example suggests how to convert PIL images into SIXEL graphics using libsixel's Python interface.
APIs are provided for C, Python, Perl, PHP, and Ruby. For documentation of the C API, see the file md/C API.md
, or its header, sixel.h
. For documentations of the APIs for scripting languages, see the README for them in their respective directories.
- https://github.com/johnnychen94/Sixel.jl (Julia wrapper)
This software is provided "as is" without express or implied warranty. The main support channel for this software is its GitHub issue tracker:
https://github.com/libsixel/libsixel/issues
Please post an issue if you have any problems, questions or suggestions.
libsixel is MIT-licensed. See the LICENSE
file. For licenses of vendorized code, see the files in the licenses
directory.
For a list of authors, see the AUTHORS
file.
- Fork the project (https://github.com/libsixel/libsixel/fork/)
- Pull (
git clone <your URL>
) - Create your feature branch (
git checkout -b my-new-feature
) - Make your changes and add your changed files (
git add ...
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
See Acknowledgements.md
.