Zero-dependency image processing library
Project description
Zignal Python Bindings
Zero‑dependency image processing primitives in Zig, exposed to Python.
Install
pip install zignal-processing
Docs: https://bfactory-ai.github.io/zignal/python/zignal.html
Quickstart
import zignal
# Load / create
img = zignal.Image.load("photo.jpg") # PNG/JPEG
img = zignal.Image(480, 640, color=(30, 144, 255)) # RGB fill
# Process
img = img.gaussian_blur(1.5)
img = img.resize(0.5, zignal.InterpolationMethod.BILINEAR)
# Pixels and NumPy interop with shared memory
img[10, 20] = zignal.Hsv(60, 100, 100)
arr = img.to_numpy() # (rows, cols, 3) uint8 view
img2 = zignal.Image.from_numpy(arr) # zero‑copy with shared memory
# Draw
canvas = img.canvas()
canvas.draw_line((10, 10), (100, 60), zignal.Rgb(255, 0, 0))
# Terminal preview (auto: kitty → sixel → sgr)
print(f"{img:auto}")
print(f"{img2:auto}") # also modified
# Save
img.save("out.png")
Highlights
- Image ops: load/save, resize/warp, crop/letterbox, extract/insert, blur/sharpen, flips
- Pixels: direct get/set; slice assignment; NumPy zero‑copy to/from
- Colors: 12 spaces (Rgb/Rgba, Hsl/Hsv, Lab/Lch, Xyz/Xyb, Oklab/Oklch, Lms, Ycbcr)
- Canvas: lines, circles, polygons, text via bitmap BDF/PCF fonts
- Geometry: Rectangle, ConvexHull, SimilarityTransform, AffineTranform, ProjectiveTransform
- Matrix: float64 matrices with NumPy bridge
- Terminal: SGR, Braille, Sixel, Kitty
- Advanced: FeatureDistributionMatching
- Core: Zig, no external dependencies
Development
- Build native extension:
zig build python-bindings - Generate stubs (
.pyi):zig build python-stubs - Editable install:
cd bindings/python && uv venv && uv pip install -e . - Tests:
uv run pytest -q
If Python headers/libs aren’t auto‑detected during build, set:
PYTHON_INCLUDE_DIR, PYTHON_LIBS_DIR, PYTHON_LIB_NAME.
License
MIT
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
Built Distributions
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 zignal_processing-0.5.1.tar.gz.
File metadata
- Download URL: zignal_processing-0.5.1.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cace5540310ec2f608308abc6fe948716f93c58f598dfab0fc9b08e82bdf6416
|
|
| MD5 |
c60a8d2c3fe9a8b0495e60d3abe5bc70
|
|
| BLAKE2b-256 |
5016cc413fb61eea3c7c78fd97afa561109926538b689383e17dc3b909f2e38e
|
File details
Details for the file zignal_processing-0.5.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 675.7 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7b969ff72c78a5ba714e4887135fc126bd9f98e3c598be91b7bf28bb62f8771
|
|
| MD5 |
94c63deddaa6c389902d6d111fe831c5
|
|
| BLAKE2b-256 |
42c58fa679e333bc6364872691936529b7f235583c21d4aa3f08c2b0a7fa18af
|
File details
Details for the file zignal_processing-0.5.1-cp313-cp313-manylinux1_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp313-cp313-manylinux1_x86_64.whl
- Upload date:
- Size: 655.3 kB
- Tags: CPython 3.13
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8af88f9157d655f2994a9ecfec878c27f7f6fa2fcdeea4538587249010532cda
|
|
| MD5 |
de3545f7388fa421079d030b5be74ae3
|
|
| BLAKE2b-256 |
9dadc0ed9403708191428e20d155cb844bb63182e287b6bff26d93773bb9830d
|
File details
Details for the file zignal_processing-0.5.1-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 483.4 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d22d02b6d99b13de279b468d2710e9baaf143a567ac40e7a2d45467d9a929364
|
|
| MD5 |
82a8fd750db792d606016b30a7cf5b6c
|
|
| BLAKE2b-256 |
db0047720085215c09a7cc94764aa3018f3927747645aa73a9efe1d8515e938a
|
File details
Details for the file zignal_processing-0.5.1-cp313-cp313-macosx_10_9_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp313-cp313-macosx_10_9_x86_64.whl
- Upload date:
- Size: 604.2 kB
- Tags: CPython 3.13, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9099be5aba82c93b77fabb091ff7081d01b4d4c9cb8600a0dcd057380bb43b29
|
|
| MD5 |
8b834ee225c38cf47d9552ffeb36f36f
|
|
| BLAKE2b-256 |
c2fe864954ebbdbbc0aabf3dcf2eefdf440590b70da7ea28fee8fa5992fe1f2e
|
File details
Details for the file zignal_processing-0.5.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 675.7 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c8c73eb5e21b5bd005f1839db717b37bec63dd8a7318b9eb94dd2ed04a0a8b3
|
|
| MD5 |
35575958c39dc12ca545374d9c38f1cb
|
|
| BLAKE2b-256 |
b8a6872e9f2d55662102bd25b1e31e736f2c8b555a79a4cb4c3ee170aa99bc61
|
File details
Details for the file zignal_processing-0.5.1-cp312-cp312-manylinux1_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp312-cp312-manylinux1_x86_64.whl
- Upload date:
- Size: 655.3 kB
- Tags: CPython 3.12
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a98a5af9fbdb341dda626e755084f5bd25fb50d8b1770af61668fb0fd608b403
|
|
| MD5 |
98b79fe337a1625bfca1f60600bf419e
|
|
| BLAKE2b-256 |
327cd96284f190d1c631626293b94ae34b476b77f7eddcddc56748ce3cdb2b94
|
File details
Details for the file zignal_processing-0.5.1-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 483.4 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d534403431d818f7b614bc87b3f6c5fca9b1afc2f2385898258c8a4cd56e81e
|
|
| MD5 |
e1a6cde3ef966ac3695d099a2d324064
|
|
| BLAKE2b-256 |
2f05ba17f718abe407ecbff6ff6111164d3388720cd99231b7e218bb52c0da48
|
File details
Details for the file zignal_processing-0.5.1-cp312-cp312-macosx_10_9_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 604.2 kB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ce7756112b0d086cf1fa368de006ccc11b950217efdf1cd992b4a25baec036a
|
|
| MD5 |
f024bbb6f2e3bf0d1b200f716a7ad044
|
|
| BLAKE2b-256 |
80df914610414a36588bf70f39b7fb79bed5e8ce43b238494dbb0ae81d43637a
|
File details
Details for the file zignal_processing-0.5.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 675.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
baea4bf13399286180e3ba90264dfedf8e5a0afaf44619af75803d139e4039bb
|
|
| MD5 |
ddabb7d92ba1c7842286ddcb759328ec
|
|
| BLAKE2b-256 |
71f949310ccefc39743d4d9cb8c461bbec778aa9fb2809564024bdfee0abebc8
|
File details
Details for the file zignal_processing-0.5.1-cp311-cp311-manylinux1_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp311-cp311-manylinux1_x86_64.whl
- Upload date:
- Size: 654.4 kB
- Tags: CPython 3.11
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afe3e75f4b6aa76fdd0a646513b51ed50a828e60c9529960a371a426e29b1c37
|
|
| MD5 |
4f6794b511d0444fa4ab87a3b2fc26da
|
|
| BLAKE2b-256 |
0a988b8f80b15f325c4ec0e6027f3a1508f515b48e35473c87cac88a85336965
|
File details
Details for the file zignal_processing-0.5.1-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 482.7 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d88f2da3393bfd13431868c5a1e6404f0b98ff8a42135a5851910a83c9ac9375
|
|
| MD5 |
4ff1e6d168db4876c6948e1b981717f9
|
|
| BLAKE2b-256 |
5c81e640ae5faf21d5c8c0b509b627adbfb732a7864da80c55743879e44314f6
|
File details
Details for the file zignal_processing-0.5.1-cp311-cp311-macosx_10_9_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 603.5 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
becc8268fd7e3f7bf4bc70220b574cccf4033c8eb6ee1c84d28697f4432fbd8c
|
|
| MD5 |
b3eb8601da2591f29f177ecce5878b62
|
|
| BLAKE2b-256 |
8294d8c1a608002edbc085e934afb1cbe382355c21d40ac0c68c391055426e45
|
File details
Details for the file zignal_processing-0.5.1-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 675.6 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cadda655c4576e727be4540fb2797ec4791b70ea7333139b4369fee951c7d534
|
|
| MD5 |
4460d006864fa8c46fcfa601d17fb358
|
|
| BLAKE2b-256 |
15646f06693266348c44f8deddb488dd63a3b8ec2d9a0613ca8a9da1cfb7b3ca
|
File details
Details for the file zignal_processing-0.5.1-cp310-cp310-manylinux1_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp310-cp310-manylinux1_x86_64.whl
- Upload date:
- Size: 654.4 kB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24de94a7bf374bb568ad0d17fa29c85c229bd06818a69cb9b738a4cf100c768b
|
|
| MD5 |
7e393d22cb3d3f61599872b653f347db
|
|
| BLAKE2b-256 |
3070231b5da328bcc876f31e20f31ecc1f54a7e8a9e2bb279ef870fd2c60521d
|
File details
Details for the file zignal_processing-0.5.1-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 482.7 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
852c8d6bbc9bb355917ea674ace7beb3f774d6e3db34ad58daecb189051c0023
|
|
| MD5 |
75205d4665ebe8dfeb2da6cc80fc9272
|
|
| BLAKE2b-256 |
aa18ccd1d3329162d3b02e798f36538395a535730cf4612deb29db369a6a7f26
|
File details
Details for the file zignal_processing-0.5.1-cp310-cp310-macosx_10_9_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.5.1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 603.6 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea43d90de866c8114fc91be8f198839c332b727622f6ce7c7f5830492a273570
|
|
| MD5 |
87a9eeee50bb7a8549a816aa465e7122
|
|
| BLAKE2b-256 |
70f9be9ef20a94c26035d2766be52f3996881ada82b8a0f83d77e3b9acd237af
|