arrufat/zignal
zero-dependency image processing library
Zignal
Zignal is a zero-dependency image processing library heavily inspired by the amazing dlib.
Originally developed at B Factory, Inc, it is now an independent open-source project.
Status
Zignal is under active development and powers production workloads at Ameli.
The API continues to evolve, so expect occasional breaking changes between minor releases.
Installation
Zig
zig fetch --save git+https://github.com/arrufat/zignalThen, 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-processingRequires 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
Features
- PCA - Principal Component Analysis
- Color spaces - RGB, HSL, HSV, Lab, XYZ, Oklab, Oklch conversions
- Matrix operations - Linear algebra functions and SVD
- Geometry - Points, rectangles, transforms, convex hull
- Image I/O - Load and save PNG/JPEG images with in-house codecs
- Image processing - Resize, rotate, crop, blur, sharpen, threshold, morphology
- Canvas API - Lines, circles, polygons, Bézier curves with antialiasing
- Fonts - Bitmap font rendering, BDF/PCF loading, and Unicode range filters
- Compression - DEFLATE, zlib, gzip, and LZ77 bitstream primitives
- Terminal graphics - Kitty and sixel with capability detection utilities
- Optimization - Hungarian assignment solver for cost/profit matrices
Motivation
This library is used by Ameli for their makeup virtual try on.
Sponsors
Special thanks to B Factory, Inc, the Founding Sponsor of Zignal.
They originally developed this library and graciously transferred ownership to the community to ensure its long-term maintenance and growth.

