百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

libsixel

> 编程语言
开源

一个来自 kmiya 的 SIXEL 编码器/解码器实现(https://GitHub.com/saitoha/sixel)。

2.8K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个来自 kmiya 的 SIXEL 编码器/解码器实现(https://GitHub.com/saitoha/sixel)。

libsixel

What is this?

This package provides encoder/decoder implementation for DEC SIXEL graphics, and some converter programs.

(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 to develop a new scope of SIXELs.

SIXEL Animation

img2sixel(1) can decode GIF animation.

Related projects

Video streaming

Now Youtube video streaming is available over SIXEL protocol by FFmpeg-SIXEL project. Above demo only uses 16 color registers.

SDL integration: Gaming, Virtualization, ...etc.

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.

  • NetSurf (screenshot)

  • Green PDF Viewer (screenshot)

  • DOOM (tweet)

  • firesdl (movie)

Langage Bindings

libsixel-python

converter.py example depends on it.

mruby-sixel

Used by mruby-webcam.

libsixel-p6

A perl6 bindings for libsixel

sixel-sys

Rust FFI bindings for libsixel

sixel-rs

A safe Rust wrapper for libsixel

id-sixel

Total Idris 2 bindings for libsixel

W3M integration

img2sixel(1) can be integrated with Debian's w3m(maintained by Tatsuya Kinoshita) that includes patches for -sixel option derived from Arakiken's w3m fork(remoteimg branch).

@uobikiemukot's sdump project selected another approach. He wrote a w3mimgdisplay compatible program yaimg-sixel. It also works with ranger.

X11 on SIXEL terminals

Xsixel is a kdrive server implementation for SIXEL terminals.

GNU Screen integration

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.

Twitter client integration

Some NetBSD/OpenBSD users are doing amazing challenges.

arakiken's mikutterm(mikutterm-sixel)

Now mikutter + mikutterm works with libsixel inline-image extension.

SIXEL works with old powerless machines such as

NetBSD/luna68k (here is OMRON LUNA-II):

NetBSD/hp300 (here is HP9000/425e):

arakiken's tw(tw-sixel)

arakiken's tw(tw-sixel) works with libsixel inline-image extension.

SIXEL works with old powerless machines such as OpenBSD/luna88k (here is OMRON LUNA-88K2 MC88100@33MHz):

sayaka-chan

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).

Other

sixelSPAD

screenshot

Includes 2 commands fricas2sixel and latex2sixel.

Neofetch

Now sixel backend is implemented. See https://github.com/dylanaraps/neofetch/wiki/Image-Backends#sixel

termplay

Depends on sixel-sys, --converter=sixel option is supported.

sixelPreviewer

Simple scripts and development environment for realtime edit-previewing for dot, svg, markdown, ...etc.

sdump

A sixel image dumper, provides pdf previewer.

RetroArch

SIXEL video driver is provided if you build it with --enable-sixel option. (screenshot)

Highlighted features

Improved compression

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 (http://mlterm.sourceforge.net/libsixel.pdf, in Japanese).

High quality quantization

img2sixel(1) supports color image quantization. It works well even if few number of colors are allowed.

Terminal requirements

If you want to view a SIXEL image, you have to get a terminal which support sixel graphics.

Now SIXEL feature is supported by the following terminals.

  • DEC VT series, VT240/VT241/VT330/VT340/VT282/VT284/VT286/VT382

  • DECterm(dxterm)

  • Kermit

  • ZSTEM 340

  • WRQ Reflection

  • RLogin (Japanese terminal emulator)

    http://nanno.dip.jp/softlib/man/rlogin/

  • mlterm

    http://mlterm.sourceforge.net/

    Works on each of X, WIN32 GDI, framebuffer, Android, Cocoa version.

  • XTerm (compiled with --enable-sixel-graphics option)

    http://invisible-island.net/xterm/

    You should launch xterm with "-ti vt340" option. The SIXEL palette is limited to a maximum of 16 colors. To avoid this limitation, Try

$ echo "XTerm*decTerminalID: vt340" >> $HOME/.Xresources
$ echo "XTerm*numColorRegisters: 256" >>  $HOME/.Xresources
$ xrdb $HOME/.Xresources
$ xterm

or

$ xterm -xrm "XTerm*decTerminalID: vt340" -xrm "XTerm*numColorRegisters: 256"
  • yaft

    https://github.com/uobikiemukot/yaft

  • recterm (ttyrec to GIF converter)

    https://github.com/uobikiemukot/recterm

  • seq2gif (ttyrec to GIF converter)

    https://github.com/saitoha/seq2gif

  • Mintty (>= 2.6.0)

    https://mintty.github.io/

  • cancer https://github.com/meh/cancer/

  • MacTerm https://github.com/kmgrant/macterm

  • wezterm https://github.com/wez/wezterm

  • aminal https://github.com/liamg/aminal

  • iTerm2 (>= 3.0.0) https://gitlab.com/gnachman/iterm2

  • st-sixel https://github.com/galatolofederico/st-sixel

  • DomTerm https://github.com/PerBothner/DomTerm

  • yaft-cocoa https://github.com/uobikiemukot/yaft-cocoa

  • toyterm https://github.com/algon-320/toyterm

Install

Using package managers

You can install libsixel via the following package systems.

  • FreeBSD ports
  • DPorts
  • pkgsrc
  • Homebrew
  • yacp
  • Debian
  • AUR
  • Portage
  • Ubuntu
  • NixOS
  • OpenBSD Ports
  • Fedora Copr
  • SlackBuilds
  • MacPorts

Build from source package

$ ./configure
$ make
# make install

Build with optional packages

You can configure with the following options

…

For more information, see "./configure --help".

Cross compiling with MinGW

You can build a windows binary in cross-build environment.

$ CC=i686-w64-mingw32-gcc cross_compile=yes ./configure --host=i686-w64-mingw32
$ make

Usage of command line tools

img2sixel

…

Convert a jpeg image file into a sixel file

$ img2sixel < images/egret.jpg > egret.sixel

Reduce colors to 16:

$ img2sixel -p 16 < images/egret.jpg > egret.sixel

Reduce colors with fixed palette:

$ img2sixel -m images/map16.png < images/egret.jpg > egret.sixel

sixel2png

Usage: sixel2png -i input.sixel -o output.png
       sixel2png < input.sixel > output.png

Options:
-i, --input     specify input

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Csixel

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言