libsixel binding for Python
Project description
What is this?
This module is a python wrapper of libsixel.
libsixel: https://github.com/saitoha/libsixel
Install
Example 1. Install into the python prefixed with ‘/usr/local’
$ git clone https://github.com/saitoha/libsixel.git $ cd libsixel $ ./configure --enable-python --prefix=/usr/local $ make install
Example 2. Install into only current active python
$ git clone https://github.com/saitoha/libsixel.git $ cd libsixel $ ./configure --disable-python $ make install # install libsixel $ cd python $ python setup.py install # install python module
Code Example
encoder
from libsixel.encoder import Encoder, SIXEL_OPTFLAG_WIDTH, SIXEL_OPTFLAG_COLORS
encoder = Encoder()
encoder.setopt(SIXEL_OPTFLAG_WIDTH, "300")
encoder.setopt(SIXEL_OPTFLAG_COLORS, "16")
encoder.encode("test.png")
decoder
from libsixel.decoder import Decoder, SIXEL_OPTFLAG_INPUT, SIXEL_OPTFLAG_OUTPUT decoder = Decoder() decoder.setopt(SIXEL_OPTFLAG_INPUT, "test.six") decoder.setopt(SIXEL_OPTFLAG_OUTPUT, "test.png") decoder.decode()
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
libsixel-python-0.3.0.tar.gz
(7.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libsixel-python-0.3.0.tar.gz.
File metadata
- Download URL: libsixel-python-0.3.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f42c0411550adda437af9f1ddddc9fc38eb2992a7ecf4ca2834fb3c9e7b88b0c
|
|
| MD5 |
dc6b69ad3b13792cccd040827a334259
|
|
| BLAKE2b-256 |
e03902258b6e7edd74eb8b2b1b2f9d03d9f0ab7ff9f15bcdcbfaa267692159ed
|
File details
Details for the file libsixel-python-0.3.0.macosx-10.9-x86_64.tar.gz.
File metadata
- Download URL: libsixel-python-0.3.0.macosx-10.9-x86_64.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f71c25900b24a3ee3de3553d36be106c7c3ceeb60efee8010b800bec3c96a4b6
|
|
| MD5 |
c8a1754e0a6ce6db4550a721d56b5120
|
|
| BLAKE2b-256 |
d8d48bfc7691d2987ca2048bc0eeb46ed6199ccf02c33bf1de61bc14de35ffd1
|