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.1.tar.gz (60.6 kB view details)

Uploaded Source

Built Distributions

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

Uploaded Egg

PySixel-0.1.1-py2.6-macosx-10.9-intel.egg (80.6 kB view details)

Uploaded Egg

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

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for PySixel-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d511478156ef8f7b054f0036b66142b45cc71031074c74ac7dd1c51b736dfe93
MD5 d9070f8a171cbc9a970c4fa4463bdcb4
BLAKE2b-256 672cc4ea2e9d565a65903fe72289b89b9907291bb4eab2ef629ef043550a8ed9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PySixel-0.1.1-py2.7-macosx-10.9-x86_64.egg
Algorithm Hash digest
SHA256 96296e8abc17850982493cbb17bdd67d1c1147331cf155ae0c9ebf382cd24924
MD5 ca2fdd284b9c17e57bdbfb0786fa3f50
BLAKE2b-256 7a15b149c9c2c160c274aaaf648cc32cf8fbe136823c3301697dd913692b41b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PySixel-0.1.1-py2.7-linux-x86_64.egg
Algorithm Hash digest
SHA256 9353c4cc371d3109fc42194234abdc41b7ed325ddb4c6294ec38dd48d616ab6e
MD5 1e2889c60e65987cfacb1ef86e70843d
BLAKE2b-256 94943436376dc50f8257dbb54a93cc400e3a454ba7b7cb11b4f8f5606998fe12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PySixel-0.1.1-py2.6-macosx-10.9-intel.egg
Algorithm Hash digest
SHA256 d13db8c3635089cba8767df174f6fa86f4d8c07ec108ed7223aeadd6ce523ec2
MD5 8540ea7dac45d38c4335f108a1c6941f
BLAKE2b-256 605af5b5d9d764e91bda1489e601a8540bedf9b6de9e07deb73a24817f375e5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PySixel-0.1.1-py2.6-linux-x86_64.egg
Algorithm Hash digest
SHA256 dd00d512aee2b671188cd047b2251e5ae2c5e9d28d1eb59f057bd7df3f260e6e
MD5 1d01638b7eb9e115bf8f3d910edb272f
BLAKE2b-256 cd62d1b05e2cab07972afb3cff9bfe8fcaaa3fdb971252686ee420ab505d1b10

See more details on using hashes here.

File details

Details for the file PySixel-0.1.1-py2.5-macosx-10.9-x86_64.egg.

File metadata

File hashes

Hashes for PySixel-0.1.1-py2.5-macosx-10.9-x86_64.egg
Algorithm Hash digest
SHA256 46b663d2cb1051bfb4d49458ba7ed8481e321613b88e05774da148eb842d659c
MD5 b9cc694ae61eb5f3252d225358ea2084
BLAKE2b-256 0a8dde974061bcb4fbe06f5a59e8db5fc452b01c44676448a50c3a42f25f1a3c

See more details on using hashes here.

Supported by

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