ZBar Rust

CI

High-level and low-level ZBar binding for the Rust language.

Compilation

To compile this crate, you need to compile the ZBar library first. You can install ZBar in your operating system, or in somewhere in your file system. As for the latter, you need to set the following environment variables to link the ZBar library:

Examples

```rust use zbar_rust::ZBarImageScanner;

use image::GenericImageView;

let img = image::open(INPUTIMAGEPATH).unwrap();

let (width, height) = img.dimensions();

let mut scanner = ZBarImageScanner::new();

let mut results = scanner.scany800(img.intoluma8().into_raw(), width, height).unwrap();

for result in results { println!("{}", String::from_utf8(result.data).unwrap()) } ```

More examples are in the examples folder.

Crates.io

https://crates.io/crates/zbar-rust

Documentation

https://docs.rs/zbar-rust

License

LGPL-2.1