Zero-dependency image processing library
Project description
Zignal Python Bindings
Zero-dependency image processing primitives written in Zig and packaged for Python.
Key Features
- Image pipelines: load/save, resize/warp, crop/letterbox, extract/insert, blur/sharpen, flips
- Pixels: direct get/set, slice assignment, zero-copy NumPy views
- Colors: 12 color models (Rgb/Rgba, Hsl/Hsv, Lab/Lch, Xyz/Xyb, Oklab/Oklch, Lms, Ycbcr)
- Canvas: lines, circles, polygons, bitmap font text drawing
- Geometry: Rectangle, ConvexHull, Similarity/Affine/Projective transforms
- Terminal output: SGR, Braille, Sixel, Kitty
- All of the above backed by Zig with no dependencies
Installation
- Python 3.10 or newer
pip install zignal-processing
Prebuilt wheels are published for common platforms. If pip falls back to building from source, ensure zig is available on your PATH.
Quickstart
import zignal
# Load or create an image
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")
Project Links
- Documentation: https://bfactory-ai.github.io/zignal/python/zignal.html
- Source code: https://github.com/bfactory-ai/zignal
- Issue tracker: https://github.com/bfactory-ai/zignal/issues
Development
- Build native extension and
.pyistubs:zig build python-bindings - Editable install:
cd bindings/python && uv venv && uv pip install -e . - Run tests:
uv run pytest -q
If Python headers or libs are not auto-detected during build, set the environment variables PYTHON_INCLUDE_DIR, PYTHON_LIBS_DIR, and PYTHON_LIB_NAME.
Binding New Functionality
See https://github.com/bfactory-ai/zignal/blob/main/BINDINGS_GUIDE.md for patterns and conventions to expose new Zignal APIs to Python (keyword lists, validators, enums, image wrapping, stubs).
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.7.1.tar.gz.
File metadata
- Download URL: zignal_processing-0.7.1.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4a63f376a23a6d5702e753364f8cbdb8b53164410ed45f68b0f0bcf322b0ce3
|
|
| MD5 |
dc23fab649229f72afe63b5b1faba353
|
|
| BLAKE2b-256 |
7a37c17624e1a5984f7db039f92b09f7dfc5a64a131b142d55bd53a569c17cd8
|
File details
Details for the file zignal_processing-0.7.1-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 992.7 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8961fc291e6478d2502b4e02ce217906b86c7b37e1ac49115c8aaf1dafee92b3
|
|
| MD5 |
e1b3727ee30a1dc5d0b9a24d0af32cd8
|
|
| BLAKE2b-256 |
7d2e5f3a3b0e2a7114f2593e7f06c19e316c52a9d9b2db175ebe1649bb6ad242
|
File details
Details for the file zignal_processing-0.7.1-cp314-cp314-manylinux1_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp314-cp314-manylinux1_x86_64.whl
- Upload date:
- Size: 934.5 kB
- Tags: CPython 3.14
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b090f819d05b7861ef7889269397f09b6e6bdb6af2bf4c965ac9ef214387f89
|
|
| MD5 |
26bc770dc1c28067b5390659fb25b2f5
|
|
| BLAKE2b-256 |
34b774c3dd0ac93678addc2ad2c1d00021e626636c1a05eab0a3b9ef25f80565
|
File details
Details for the file zignal_processing-0.7.1-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 674.2 kB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1382de3cc14db9d6029c9ea4ab6b950f88249d64568852fafc8537bcfd8faa6
|
|
| MD5 |
a290b082411ffcd2c9574a4bc04491e5
|
|
| BLAKE2b-256 |
867b0e4347dfe1b130ebdb502732a66b11116bd00f38647ff47422fac551fa4f
|
File details
Details for the file zignal_processing-0.7.1-cp314-cp314-macosx_10_9_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp314-cp314-macosx_10_9_x86_64.whl
- Upload date:
- Size: 842.5 kB
- Tags: CPython 3.14, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47c826b6afcb2c01de64214c4b0a70a600bff6d43d7788fcfa07b599c06d3248
|
|
| MD5 |
a30632d04be3c33d06e566273d9a086f
|
|
| BLAKE2b-256 |
51801339e3b9fcf5c85cc0389036102ff6741da45490c5260de0ffda65ef78f3
|
File details
Details for the file zignal_processing-0.7.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 964.5 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
390cbecfd80f17c1865b4337299910b47e3645eba75ffb055b0ecad9f7bb63da
|
|
| MD5 |
d7e0fbc6956507dfdaed2216e604c546
|
|
| BLAKE2b-256 |
0e1991860fb7a561f4ca7ea5f1ef341396dadfd5bdc8cf6cd5f18643de16f530
|
File details
Details for the file zignal_processing-0.7.1-cp313-cp313-manylinux1_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp313-cp313-manylinux1_x86_64.whl
- Upload date:
- Size: 934.3 kB
- Tags: CPython 3.13
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c525fb71c938172314c0b10357ccb1a32015d4734fa26102ede1b3ee516f114e
|
|
| MD5 |
bba76a0e03e4080d6d734ed4eae6b8be
|
|
| BLAKE2b-256 |
78ca899c31a8428d309988265e21cab2d288e6a73a01b027b476bbff52dab1e5
|
File details
Details for the file zignal_processing-0.7.1-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 673.9 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01e80bad847443102c2ebda22fcf5f236fbecd2b6788efef79c7b0deb3655a9f
|
|
| MD5 |
23d1f26afab32b157ffd5123273c5e37
|
|
| BLAKE2b-256 |
b362b3b273ee85bb79f76e408d14d3df9502b19263f1b202d253644fdaf6ce0c
|
File details
Details for the file zignal_processing-0.7.1-cp313-cp313-macosx_10_9_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp313-cp313-macosx_10_9_x86_64.whl
- Upload date:
- Size: 841.9 kB
- Tags: CPython 3.13, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ea00afaf770954f995841d9c4c8686c424ac0b081e06a877677db7eb213b665
|
|
| MD5 |
c837220c6c2ff1d0ede7c51ec295e402
|
|
| BLAKE2b-256 |
985d5430c5608c6fa5da95cd5cc39b309bc77074783f4fc4d51a71c86022f36d
|
File details
Details for the file zignal_processing-0.7.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 964.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cec1417c461cdf81a3fbf8dae267589a745ea97ce8db7d6cab8acd9887ec0712
|
|
| MD5 |
6a7b81be38d29400205116dca462c409
|
|
| BLAKE2b-256 |
3e2670eb4f10df2f5f92bc2221e55be559d36406e9bcbacf7a1fd2b5139d6dc8
|
File details
Details for the file zignal_processing-0.7.1-cp312-cp312-manylinux1_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp312-cp312-manylinux1_x86_64.whl
- Upload date:
- Size: 934.3 kB
- Tags: CPython 3.12
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e34d78518dc1219e1c5726018e985023467a63b908e97a26a56dcfae59657ff
|
|
| MD5 |
bc5c0ce76870bb0e070b23d36a02b557
|
|
| BLAKE2b-256 |
d9236ecab9fcf6326f1693745ac5214086f5ff620787d22493ecdecab496d167
|
File details
Details for the file zignal_processing-0.7.1-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 673.8 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00863a462dfd9373c8a6bcd26dbea56df25a6526e142aa10f13f9fa00a34592b
|
|
| MD5 |
44617b34cbe33937b0ae50bb08ecb788
|
|
| BLAKE2b-256 |
5542027bf7ec20193132d99f0049d8e5439b872ad24f33e5787a1f0f6afdb9f4
|
File details
Details for the file zignal_processing-0.7.1-cp312-cp312-macosx_10_9_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 841.9 kB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9333e9be5cd30dfd981fd2542ce881fa2c6a40687e8c7ca2d18e7fd99e960fd4
|
|
| MD5 |
90e8a5c931957069ef0e90e79764e168
|
|
| BLAKE2b-256 |
f1cf0337caa8f256272c9c9574c25aebe96e23d1df41566afe719a417d84caed
|
File details
Details for the file zignal_processing-0.7.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 964.7 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afaaed0bdfe537844e900d6bdc93c42bd3768467dac68efbaed123bb665aaee6
|
|
| MD5 |
64c9d98cafbccd048af58b65ddb715bc
|
|
| BLAKE2b-256 |
f16c83677468f26b62dc6678643b89284ddda0d4b288939155b6bfe4f1ab4676
|
File details
Details for the file zignal_processing-0.7.1-cp311-cp311-manylinux1_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp311-cp311-manylinux1_x86_64.whl
- Upload date:
- Size: 933.6 kB
- Tags: CPython 3.11
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f83f31b6f612f24da31761a549486bec1aedb56de87d61f608d2a2dc45aca8a
|
|
| MD5 |
c66ae384fc8f3527eccbfe21392b6c4f
|
|
| BLAKE2b-256 |
e38c8203fa2d4d5a2b8e9ec83741e8b18eb69b3c9b9c335a5f395cacfbd8d2e2
|
File details
Details for the file zignal_processing-0.7.1-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 673.7 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cb4d71c2ac8ab9af8d0bf531424080f7b3d1a380abe2e14fb582a47c5414a20
|
|
| MD5 |
291511d5890364632ba6aa2f5191b7ee
|
|
| BLAKE2b-256 |
eb797aafc7a59be5e1c03029686c5cdf3abc6849c99998c6168a487071f8641e
|
File details
Details for the file zignal_processing-0.7.1-cp311-cp311-macosx_10_9_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 841.1 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b4eb650f98ae04293c52c63738195cc3c12209c4c29fda057813e09360b83ad
|
|
| MD5 |
c18908ad2c4d6f56e00010b5e40f621f
|
|
| BLAKE2b-256 |
df61f44b61343ec7fed0265cc53bebc0b294712f7ae50902d8c2055e7d37d791
|
File details
Details for the file zignal_processing-0.7.1-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 964.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd4604018d5659c0ddce09167da3720d3a7b19ffc355046c080814350bcfd654
|
|
| MD5 |
0bf44bd46c93de859ad5254503e9037c
|
|
| BLAKE2b-256 |
c953583d2323a739688ea2368864cde1a91b48ad07ca34159ece6eb0f3b82996
|
File details
Details for the file zignal_processing-0.7.1-cp310-cp310-manylinux1_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp310-cp310-manylinux1_x86_64.whl
- Upload date:
- Size: 933.6 kB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf1477429621db9d66fafc2434c0f218a0b1a172d7125f6e9ce78bc80a74adda
|
|
| MD5 |
52dacc0802b82891515a9638edf2f070
|
|
| BLAKE2b-256 |
6a76872a4b01dbdd786e990cb1497e8fdceccf94e66922535add7da8c96d42de
|
File details
Details for the file zignal_processing-0.7.1-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 673.7 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd295193409c669e7f6ec5e28cf6d47bed08257c6db2c5aec072697dbff3bfab
|
|
| MD5 |
6990b79bd2c0c03e771825241cb24a03
|
|
| BLAKE2b-256 |
0817d203f8e437ff38edc1bd274c0c8e900bb0193790f3cffb0b7f4bb01ce257
|
File details
Details for the file zignal_processing-0.7.1-cp310-cp310-macosx_10_9_x86_64.whl.
File metadata
- Download URL: zignal_processing-0.7.1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 841.3 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd918cade11056b17fb43adafbedb1e726d499ae10c937a112cf469185a13a38
|
|
| MD5 |
27e010f1debb19992df7a94cbbf94e03
|
|
| BLAKE2b-256 |
be4af373a2c2d0abf817e0c0208af17b143e06bd13614c815ffa3bab5b9426bb
|