Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wanzenbug/rqrr
QR reader written in Rust
https://github.com/wanzenbug/rqrr
Last synced: 1 day ago
JSON representation
QR reader written in Rust
- Host: GitHub
- URL: https://github.com/wanzenbug/rqrr
- Owner: WanzenBug
- License: apache-2.0
- Created: 2018-12-13T14:57:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-14T10:18:15.000Z (8 months ago)
- Last Synced: 2024-03-15T07:25:38.605Z (8 months ago)
- Language: Rust
- Size: 3.63 MB
- Stars: 37
- Watchers: 4
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# rust-qr-reader - Find and read QR-Codes
[![documentation](https://docs.rs/rqrr/badge.svg)](https://docs.rs/rqrr/)
[![Build Status](https://github.com/WanzenBug/rqrr/actions/workflows/CI.yaml/badge.svg?branch=master)](https://github.com/WanzenBug/rqrr/actions/workflows/CI.yaml)This crates exports functions and types that can be used to search for QR-Codes in images and
decode them.## Usage
The most basic usage is shown below:```rust
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](https://docs.rs/rqrr/)## License
Either [APACHE](LICENSE-APACHE) or [MIT](LICENSE-MIT)## Attribution
This library was made on the base of [quirc](https://github.com/dlbeer/quirc)