Skip to main content

Display images in the terminal

Project description

python-sixel

Display images in the terminal using Sixel.

This is a fork of PySixel to add windows compatibility.

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

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

python_sixel_windows-0.2.2.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

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

python_sixel_windows-0.2.2-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file python_sixel_windows-0.2.2.tar.gz.

File metadata

  • Download URL: python_sixel_windows-0.2.2.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for python_sixel_windows-0.2.2.tar.gz
Algorithm Hash digest
SHA256 94bae0ef88363b6920ed5c1f121412bf984bd1bf57b042165aa38317194053c0
MD5 d8e4abed2047d325104e22146b2c1cd4
BLAKE2b-256 45e6f203d4e2602d4cafa00eaef3c2587b0a87fc707b6dfd064e9665b9fdbcde

See more details on using hashes here.

File details

Details for the file python_sixel_windows-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_sixel_windows-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 22fbb6fe8b9a85710faecd3b347989a41d6489da6e2f1bf027ef41f56ef4ee2a
MD5 e40428421b2f6502a49f2e8ae00d8017
BLAKE2b-256 4b30b6a45b8260023a171e8768c906b3b328b653d94cf69fa252426d815c2fb7

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