Zignal is a zero-dependency image processing library inspired by dlib.
Zignal covers the building blocks of an image processing pipeline in a single dependency:
- Images: pure-Zig PNG, JPEG, BMP and GIF codecs, geometric transforms, filters, color spaces, enhancement and drawing with an antialiased canvas, bitmap and vector fonts, and terminal graphics.
- Vision: feature detection and matching, edge detection, Hough transform, QR codes, style transfer and quality metrics.
- Math: matrices and decompositions, geometry, statistics, PCA, global optimization and clustering.
- Parallelism: heavy operations run on a thread pool through
std.Ioand give byte-identical results when run serially. - Platforms: native Zig, Python bindings and WASM for the web.
See the documentation for the full API.
Zignal is under active development and the API continues to evolve. Expect occasional breaking changes between minor releases.
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"));pip install zignal-processingRequires Python 3.10+, no external dependencies
Bindings | PyPI Package | Documentation
Zignal includes a command-line interface to display images in the terminal, inspect them, resize, blur, detect edges, tile them into a grid, apply style transfer, encode and decode QR codes, compare them with visual diffs and quality metrics, and chain operations into pipelines.
# Build the CLI
zig build
# List the available commands
zig-out/bin/zignal help
# Show the options of a specific command
zig-out/bin/zignal help <command>The interactive demos run Zignal in the browser through WASM and showcase color spaces, face alignment, seam carving, feature matching, global optimization, QR codes and more. Their sources live in the examples directory alongside native Zig programs.
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.

