Skip to main content

View full-pixel color graphics on SIXEL-supported terminals(DECterm/Reflection/RLogin/mlterm/tanasinn/xterm)

Project description

What is SIXEL?

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

SIXEL is one of image formats for terminal imaging introduced by DEC VT series. SIXEL image data scheme is represented 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.

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

I heard SIXEL was supported by some old terminal applications, such as SAS, WordPerfect.

Nowadays netpbm and Gnuplot support this.

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

Show sixel in xterm

$ curl ftp://invisible-island.net/xterm/xterm-301.tgz | tar xz
$ cd xterm-301
$ ./configure --enable-wide-chars --enable-sixel-graphics --enable-256-color
$ make
# make install
$ xterm -ti vt340 -e 'sixelconv -n16 ~/testdir/test.jpg'

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

Uploaded Source

Built Distributions

PySixel-0.1.5-py2.7-macosx-10.9-x86_64.egg (50.2 kB view details)

Uploaded Egg

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

Uploaded Egg

PySixel-0.1.5-py2.6-macosx-10.9-intel.egg (81.9 kB view details)

Uploaded Egg

PySixel-0.1.5-py2.6-linux-x86_64.egg (141.1 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for PySixel-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d9ae7a670de639a177d73ad49e8dbfd7e431f11caeeff2ece86e43e12f8da1ef
MD5 0d7397f23c74a6583e8ae5adfb00793b
BLAKE2b-256 d1245ae5289764116063d3cdcf8499b6899e270ae7a83ec712ecc3d3e611d2b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PySixel-0.1.5-py2.7-macosx-10.9-x86_64.egg
Algorithm Hash digest
SHA256 da99502e7d1cd1b9a0eb4eeaa4b78403eb6a9e59f20cb2142be1f4d5ca9773b5
MD5 11ebf79f1980dd1ba6b3e7d56416d5a2
BLAKE2b-256 ff8df302480e137f3d285e074f8e3d0c3dcb5cd082af5da162949f325d1f11bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PySixel-0.1.5-py2.7-linux-x86_64.egg
Algorithm Hash digest
SHA256 9815245766299b60ba31bc6c317a489aa0674975425407de8bbbbde3e7d9b2b3
MD5 b0251a9eda0811d5fd4c9c6b9e330e15
BLAKE2b-256 534ae6ee2259280036f6eefa0ceefbc11acb35fbb3b81110ba748ed7c3df789e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PySixel-0.1.5-py2.6-macosx-10.9-intel.egg
Algorithm Hash digest
SHA256 c01b86af215d6fa9f90112b0f5cd8fe9b90f35c8c96f4038e32de8206f53bee8
MD5 02dcf43362c5861dd7e70607a740068e
BLAKE2b-256 c4ad9bd55faf663fd68eb876bba895d0cf39ab7b0e72902e2fd6d1e298054c9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PySixel-0.1.5-py2.6-linux-x86_64.egg
Algorithm Hash digest
SHA256 9b6bfbfd167a67a0bc17164a9051d054218426779899f12960dbc5e11986da42
MD5 94b5f4de7a671ebcb0d5cf069561c1e5
BLAKE2b-256 4f7ac598319a2feee82ab8782a2384f0101680f3a0b7821f3363802b90d527d3

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