A library for cropping sixel images
Project description
sixelcrop
Crop sixel images in sixel-space!
sixelcrop is a Python library and command line tool to crop sixel images
Installation
pipx install sixelcrop
# OR
pip install sixelcrop
Usage
Command Line
usage: sixelcrop [--help] [-x int] [-y int] [-w int] [-h int] [--no-private-colors] Path
Crop a sixel image in sixel space
positional arguments:
Path Path to sixel image file (use '-' to read data from standard input)
options:
--help
-x int, --left int The offset of the left edge of the target region
-y int, --top int The offset of the top edge of the target region
-w int, --width int The width of the target region
-h int, --height int The height of the target region
--no-private-colors Do not use private colors for each graphic
Example:
curl https://www.python.org/static/img/python-logo@2x.png | img2sixel | sixelcrop -x 10 -y 15 -w 120 -h 125 -
Python API
import sys
from sixelcrop import sixelcrop
with open("snake.six") as f:
data = f.read()
sys.stdout.write(sixelcrop(data, x=300, y=50, w=200, h=150))
License
sixelcrop
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sixelcrop-0.1.9.tar.gz
(7.3 kB
view details)
Built Distribution
File details
Details for the file sixelcrop-0.1.9.tar.gz
.
File metadata
- Download URL: sixelcrop-0.1.9.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6c05ac4fbd6e201f794aded12300fb427573172c0544a1fd25a48a66a5bc86f |
|
MD5 | b3e15cad055b8eff96d0f26ff1ea2901 |
|
BLAKE2b-256 | 1c3dc576ad3649bec5259b8cc64a05b4c1fd7d1d1ee44e0b577d2e8891f41783 |
File details
Details for the file sixelcrop-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: sixelcrop-0.1.9-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed1648d040d480a41d7f76aa1fa19af4ba82caa895f6773eaadd32e04779dce1 |
|
MD5 | 83bb89788caa25aaab75007766f740c4 |
|
BLAKE2b-256 | f0db48339b894ecbff7998a14b1a82c07d383b33108fd7c3becb6cae75bfa5af |