qrism
A Rust library for generating and reading QR codes with Reed-Solomon error correction. Supports traditional monochromatic QR codes with additional experimental multicolor QR support for 3x enhanced storage capacity.
Features
- QR Code Generation: Create QR codes with customizable versions, error correction levels, and capacity
- QR Code Reading: Detect and decode QR codes from images with robust error correction
- Reed-Solomon Error Correction: Built-in error correction with configurable levels (L, M, Q, H)
- High Capacity QR Support: Experimental polychromatic QR codes with 3x storage capacity
- Image Processing: Advanced binarization and geometric correction for reliable detection
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Quick Start
Simple QR Code Generation
use QRBuilder;
Reading a QR Code
use detect_qr;
High Capacity QR Codes (3x Storage)
High capacity QR codes achieve 3x the storage capacity by leveraging color channels for data encoding. Unlike standard monochromatic QR codes that use only black and white modules, high capacity QR codes utilize the full RGB color spectrum by multiplexing three separate QR codes into a single visual code.
use QRBuilder;
use detect_hc_qr;
Error Correction Levels
- L (Low): ~7% error correction
- M (Medium): ~15% error correction (default)
- Q (Quartile): ~25% error correction
- H (High): ~30% error correction
Examples
See the examples/ directory for more comprehensive usage examples.
License
This project is licensed under the MIT License - see the LICENSE.txt file for details.
Attribution
Test images used from the ZXing project (https://github.com/zxing/zxing), licensed under the Apache License 2.0. Attribution is provided in accordance with the license.