1 unstable release
0.7.2 | Sep 29, 2024 |
---|
#66 in #qrcode
3MB
4K
SLoC
rust-qr-reader - Find and read QR-Codes
This crates exports functions and types that can be used to search for QR-Codes in images and decode them.
Attention
This is a fork of rqrr by WanzenBug, which is extended in such a way to offer Methods of extracting raw data of QR-Codes.
Usage
The most basic usage is shown below:
use image;
use rqrr;
let img = image::open("tests/data/github.gif")?.to_luma();
// Prepare for detection
let mut img = rqrr::PreparedImage::prepare(img);
// Search for grids, without decoding
let grids = img.detect_grids();
assert_eq!(grids.len(), 1);
// Decode the grid
let (meta, content) = grids[0].decode()?;
assert_eq!(meta.ecc_level, 0);
assert_eq!(content, "https://github.com/WanzenBug/rqrr");
For more information visit docs.rs
License
Attribution
This library was made on the base of quirc