qr_code

crates.io MIT OR Apache 2.0

QR code and Micro QR code encoder in Rust. Documentation.

Example

Bmp image generation

// TODO

Unicode string generation

```rust use qrcode::QrCode; use qrcode::render::unicode;

fn main() { let code = QrCode::new("mow mow").unwrap(); let image = code.render::() .darkcolor(unicode::Dense1x2::Light) .lightcolor(unicode::Dense1x2::Dark) .build(); println!("{}", image); } ```

Generates this output:

text █████████████████████████████ █████████████████████████████ ████ ▄▄▄▄▄ █ ▀▀▀▄█ ▄▄▄▄▄ ████ ████ █ █ █▀ ▀ ▀█ █ █ ████ ████ █▄▄▄█ ██▄ ▀█ █▄▄▄█ ████ ████▄▄▄▄▄▄▄█ ▀▄▀ █▄▄▄▄▄▄▄████ ████▄▀ ▄▀ ▄ █▄█ ▀ ▀█ █▄ ████ ████▄██▄▄▀▄▄▀█▄ ██▀▀█▀▄▄▄████ █████▄▄▄█▄▄█ ▀▀▄█▀▀▀▄█▄▄████ ████ ▄▄▄▄▄ █ ▄▄██▄ ▄ ▀▀████ ████ █ █ █▀▄▄▀▄▄ ▄▄▄▄ ▄████ ████ █▄▄▄█ █▄ █▄▀▄▀██▄█▀████ ████▄▄▄▄▄▄▄█▄████▄█▄██▄██████ █████████████████████████████ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀