Zignal
June 15, 2026 · View on GitHub
Zignal is a zero-dependency image processing library inspired by dlib.
Features
- Core Math: Matrices (
SMatrix,Matrix, SVD), PCA, ND Geometry (SIMD Points, affine/projective transforms, convex hull), Statistics, Optimization. - Computer Vision: Feature detection and matching (FAST, ORB), Edge detection (Shen-Castan), Hough Transform, Feature Distribution Matching (style transfer).
- Image Processing: Spatial transforms (resize, crop, rotate), morphology, convolution filters (blur, sharpen), thresholding, advanced Color Spaces (Lab, Oklab, Oklch, Xyb, Lms, etc.), Perlin noise generation.
- I/O & Graphics: Pure-Zig PNG/JPEG codecs, Canvas API (antialiasing, Bézier curves), Bitmap/PCF Fonts, Colormaps, Terminal graphics (Kitty/Sixel).
- Platform Support: Native Zig, first-class Python bindings, and WASM compilation for the web.
Status
Zignal is under active development and the API continues to evolve. Expect occasional breaking changes between minor releases.
Installation
Zig
zig fetch --save git+https://github.com/arrufat/zignal
Then, in your build.zig
const zignal = b.dependency("zignal", .{ .target = target, .optimize = optimize });
// And assuming that your b.addExecutable `exe`:
exe.root_module.addImport("zignal", zignal.module("zignal"));
// If you're creating a `module` using b.createModule, then:
module.addImport("zignal", zignal.module("zignal"));
Python
pip install zignal-processing
Requires Python 3.10+, no external dependencies
Bindings | PyPI Package | Documentation
CLI
Zignal includes a command-line interface for common operations.
# Build the CLI
zig build
# Run commands
zig-out/bin/zignal <command> [options]
Available commands:
display- View images in the terminal (supports Kitty, Sixel, etc.)resize- Resize images with various filterstile- Combine multiple images into a gridfdm- Apply style transfer (Feature Distribution Matching)info- Show image metadata
Examples
Interactive demos showcasing Zignal's capabilities:
- Color space conversions - Convert between RGB, HSL, Lab, Oklab, and more
- Face alignment - Facial landmark detection and alignment
- Perlin noise generation - Procedural texture generation
- Seam carving - Content-aware image resizing
- Feature distribution matching - Statistical color transfer
- Contrast enhancement - Autocontrast and histogram equalization side-by-side
- White balance - Automatic color correction
- Feature matching - ORB feature detection and matching between images
- Hough transform animation - Real-time visualization of line detection
- Metrics analyzer - PSNR and SSIM comparison for reference vs. distorted images
- Global optimization - Type a JavaScript function and watch the MaxLIPO+TR optimizer search for its optimum
Sponsors
Special thanks to B Factory, Inc, the Founding Sponsor of Zignal. I originally developed this library internally for Ameli's virtual makeup try-on system, and B Factory graciously transferred ownership to the community to ensure its long-term maintenance and growth.