Skip to main content

Make SIXEL color graphics supported by some terminal emulators(DECTerm/RLogin/mlterm/tanasinn/xterm)

Project description

What is SIXEL?

SIXEL is one of image formats for terminal imaging introduced by DEC VT series. SIXEL image data scheme is representation as a terminal-friendly escape sequence. So if you want to show a SIXEL image file, all you have to do is “cat” it to your terminal.

SIXEL is supported by old terminal applications, such as SAS, WordPerfect. Now netpbm and Gnuplot support this.

http://zuse.jp/misc/sixel_gnuplot.png http://zuse.jp/misc/sixel_hikari.png http://zuse.jp/misc/sixel_ls.png

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.

Install

via github

$ git clone https://github.com/saitoha/PySixel.git
$ cd pysixel
$ python setup.py install

or via pip

$ pip install PySixel

Usage

PySixel provides a Command line tool:

$ sixelconv [options] filename

or

$ cat filename | sixelconv [options]
  • Options:

    -h, --help                                            show this help message and exit
    -8, --8bit-mode                                       Generate a sixel image for 8bit terminal or printer
    -7, --7bit-mode                                       Generate a sixel image for 7bit terminal or printer
    -r, --relative-position                               Treat specified position as relative one
    -a, --absolute-position                               Treat specified position as absolute one
    -x LEFT, --left=LEFT                                  Left position in cell size, or pixel size with unit 'px'
    -y TOP, --top=TOP                                     Top position in cell size, or pixel size with unit 'px'
    -w WIDTH, --width=WIDTH                               Width in cell size, or pixel size with unit 'px'
    -e HEIGHT, --height=HEIGHT                            Height in cell size, or pixel size with unit 'px'
    -t ALPHATHRESHOLD, --alpha-threshold=ALPHATHRESHOLD   Alpha threshold for PNG-to-SIXEL image conversion
    -c, --chromakey                                       Enable auto chroma key processing
    -n NCOLOR, --ncolor=NCOLOR                            Specify number of colors

Example

View an image file:

$ sixelconv test.png

Generate sixel file from an image file:

$ sixelconv < test.png > test.six

View generated sixel file:

$ cat test.six

Code Example

import sixel
writer = sixel.SixelWriter()
writer.draw('test.png')

Dependency

Reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PySixel-0.1.2.tar.gz (60.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

PySixel-0.1.2-py2.7-macosx-10.9-x86_64.egg (49.5 kB view details)

Uploaded Egg

PySixel-0.1.2-py2.7-linux-x86_64.egg (141.2 kB view details)

Uploaded Egg

PySixel-0.1.2-py2.6-macosx-10.9-intel.egg (80.5 kB view details)

Uploaded Egg

PySixel-0.1.2-py2.6-linux-x86_64.egg (141.2 kB view details)

Uploaded Egg

File details

Details for the file PySixel-0.1.2.tar.gz.

File metadata

  • Download URL: PySixel-0.1.2.tar.gz
  • Upload date:
  • Size: 60.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PySixel-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8f012ca8a7cacbf46386ff22f7f54433fe8f266e5c8a1ca15dea26de7b8695f0
MD5 c88003c6e785f2557bcec06cec8dc8e7
BLAKE2b-256 9b6b243c0b777afcfd4650afd0d4a4a03a2356a589ae6646ce2d7e7d181a51e1

See more details on using hashes here.

File details

Details for the file PySixel-0.1.2-py2.7-macosx-10.9-x86_64.egg.

File metadata

File hashes

Hashes for PySixel-0.1.2-py2.7-macosx-10.9-x86_64.egg
Algorithm Hash digest
SHA256 9626a5036cf2c8f68ddc35a5556c868caddec43e8902b4bd53d3ffbce2566940
MD5 a52f16b40224ea05030ee64d6b1d39c8
BLAKE2b-256 a39a8e3c52d9dde4c6ad08f435de240bd8a64e4ce1ee7d953a63a6cefc8b0273

See more details on using hashes here.

File details

Details for the file PySixel-0.1.2-py2.7-linux-x86_64.egg.

File metadata

File hashes

Hashes for PySixel-0.1.2-py2.7-linux-x86_64.egg
Algorithm Hash digest
SHA256 b2fa11805abc0458b20bb81f45daf41b0769796b844ac01cab2402d12ec65ecc
MD5 cedb0da4fd146129854f0b59e92e9a19
BLAKE2b-256 8dfbfa2461a652979ed3af316057c3e8313dc2142992f52c659980dcdbae895f

See more details on using hashes here.

File details

Details for the file PySixel-0.1.2-py2.6-macosx-10.9-intel.egg.

File metadata

File hashes

Hashes for PySixel-0.1.2-py2.6-macosx-10.9-intel.egg
Algorithm Hash digest
SHA256 ee52168413b8fc8d17855a24d14e6f363064396202e1cffae9fb4e10ecabafd3
MD5 5aa403c310f6d070ef612b0313424430
BLAKE2b-256 081094d39246c5053dcb915bb7f86d60c6ef71f13fb4d5e06f0052eee7650265

See more details on using hashes here.

File details

Details for the file PySixel-0.1.2-py2.6-linux-x86_64.egg.

File metadata

File hashes

Hashes for PySixel-0.1.2-py2.6-linux-x86_64.egg
Algorithm Hash digest
SHA256 43122a2c5d83599be05efa555be54b2372989e1e0f201a95ceca248b206896e6
MD5 c1ae84fe0df960b3fe57f7525945128c
BLAKE2b-256 e40c47687a83a166031bf5a4babcd2677427cf80bb6c36b44c52244c6374e32c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page