Overview of Image::LibSIXEL Perl module
masterImage::LibSIXEL is a Perl interface for libsixel, providing a lightweight and fast implementation of the DEC SIXEL graphics codec. It provides wrapper objects for encoding and decoding operations.repository·master·Indexed 25 days ago
https://github.com/saitoha/libsixelA lightweight, fast implementation of the DEC SIXEL graphics codec for encoding and decoding images and animations within terminal emulators. It includes the img2sixel command-line utility for image conversion, the sixel2png tool for decoding, and language bindings for Python, Perl, mruby, Rust, and Idris 2. Version v1.8.7-r2.
Image::LibSIXEL is a Perl interface for libsixel, providing a lightweight and fast implementation of the DEC SIXEL graphics codec. It provides wrapper objects for encoding and decoding operations.cat command to output them to a SIXEL-compatible terminal.img2sixel(1) supports high-quality color image quantization, performing well even when restricted to a small number of colors.You can install the libsixel-ruby gem using Bundler by adding it to your Gemfile, or by installing it directly via the command line. Note that you must have libsixel (version 1.5.0 or higher) installed on your system as a requirement.
gem 'libsixel-ruby'$ gem install libsixel-ruby
$ bundle
You can install the Python wrapper using one of two methods depending on whether you want to integrate it with a system-wide Python installation or just your current active environment.
Use this method if you want to configure the build to include Python support during the main libsixel configuration step.
Use this method to install the core libsixel library first, and then install the Python module separately using setup.py.
Note: Both methods require cloning the repository and running the build process.
# Example 1: Install into Python prefixed with '/usr/local'
$ git clone https://github.com/saitoha/libsixel.git
$ cd libsixel
$ ./configure --enable-python --prefix=/usr/local
$ make install
# Example 2: Install into only current active python
$ git clone https://github.com/saitoha/libsixel.git
$ cd libsixel
$ ./configure --disable-python
$ make install
$ cd python
$ python setup.py installimg2sixel(1) with Debian's w3m using patches for the -sixel option. Alternatively, the yaimg-sixel program (part of the sdump project) is a w3mimgdisplay compatible program that works with ranger.libsixel is available through various package managers including:
Once built, you can run the demo. Note that this only works when executed within a SIXEL-compatible terminal.
$ ./demo$ makeTo view SIXEL images in XTerm, it must be compiled with the --enable-sixel-graphics option. You must launch XTerm using the -ti vt340 option.
By default, the SIXEL palette in XTerm is limited to 16 colors. To enable up to 256 colors, use one of the following methods:
Method 1: Using .Xresources
$ echo "XTerm*decTerminalID: vt340" >> $HOME/.Xresources
$ echo "XTerm*numColorRegisters: 256" >> $HOME/.Xresources
$ xrdb $HOME/.Xresources
$ xtermMethod 2: Using command line flags
$ xterm -xrm "XTerm*decTerminalID: vt340" -xrm "XTerm*numColorRegisters: 256"$ echo "XTerm*decTerminalID: vt340" >> $HOME/.Xresources
$ echo "XTerm*numColorRegisters: 256" >> $HOME/.Xresources
$ xrdb $HOME/.Xresources
$ xterm--enable-sixel configuration option.To build libsixel from the source package, run the following commands:
$ ./configure
$ make
# make install$ ./configure
$ make
# make install