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.8.tar.gz
(7.4 kB
view details)
Built Distribution
File details
Details for the file sixelcrop-0.1.8.tar.gz
.
File metadata
- Download URL: sixelcrop-0.1.8.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a662ebeeb43a713932ec8601f258cb6247f3fdffebd783d23d810f79ca654d1a |
|
MD5 | 918a968639f52afa750a8cb6c6fa163d |
|
BLAKE2b-256 | c3b0a9cc0f8e52a7ae871555bdd5fc1009d4faac4eff082556c509cc2d16be98 |
File details
Details for the file sixelcrop-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: sixelcrop-0.1.8-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b1f9aa95512f4eb90e1a4f7492cb2325e724147aa9c2f67985e37ee32f9ef07 |
|
MD5 | 6c05df221af2d2d3e3b18c243b3660b7 |
|
BLAKE2b-256 | 1e9d5e3576d8fd2c1c1c4304095377794b72de51b491f8342847f5824f57aea9 |