Skip to main content

python-sixel

Display images in the terminal using Sixel.

This is a fork of the no longer maintained PySixel.

Check arewesixelyet.com for supported terminals.

Installation

PyPI release

pip install sixel

git main branch

pip install git+https://github.com/lubosz/python-sixel.git

Local copy

git clone https://github.com/lubosz/python-sixel.git
cd python-sixel
pip install -e .

Example

import sys
from sixel import converter

c = converter.SixelConverter("foo.png")
c.write(sys.stdout)

See examples directory for more examples.

sixelconv

python-sixel provides a command line tool.

Display an image in the terminal

sixelconv [options] filename

Or by using a pipe

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
-b, --body-only                                       Output sixel without header and DCS envelope
-f, --fast                                            The speed priority mode (default)
-s, --size                                            The size priority mode

Examples

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

Download files

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

Source Distribution

sixel-0.2.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

sixel-0.2.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file sixel-0.2.0.tar.gz.

File metadata

  • Download URL: sixel-0.2.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for sixel-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6b28414eb22e2242d16e282226d08406c27c9e630daf209cc9d9ffe4b27465af
MD5 a419c9f2475765cf9a97dae1c0175245
BLAKE2b-256 1ba50604243500f7bc16bd87d396f832c0c8b4cf7b29c40cc3f612e3c8be814b

See more details on using hashes here.

File details

Details for the file sixel-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sixel-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for sixel-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e02df14d9915f33c595bac90bc1593dbc3b9e898d625adec74420fba326ecc3
MD5 14db9b52aa99cd02b2de69054a0cd432
BLAKE2b-256 7a4bcc8a06652ca1aee61e437908917e71e8a7185fee104962a458525c675bd9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Supported by

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