qr_code
QR code and Micro QR code encoder in Rust. Documentation.
Example
Bmp image generation
requires bmp
feature
let qr_code = new.unwrap;
let bmp = qr_code.to_bmp;
bmp.write.unwrap;
Generate this image:
Looks small?
Many context supports rescaling mode specific for pixelated images, for example in html image-rendering: pixelated;
As an alternative see method Bmp::mul
and Bmp::add_whitespace
Unicode string generation
let qr_code = new.unwrap;
println!;
Generates this output (looks better in terminal):
█▀▀▀▀▀█ ▀▀▀█ █▀▀▀▀▀█
█ ███ █ █ █ ▀ █ ███ █
█ ▀▀▀ █ ██ ▄▀ █ ▀▀▀ █
▀▀▀▀▀▀▀ █ █ ▀ ▀▀▀▀▀▀▀
▀ ▀█▀▀▀ ▄▀ █▄▄█▀▀██ ▄
█▀▀█▀▄▄▀█▄█▄█▀ ██▀
▀▀▀ ▀▀█▀▀ █ █ ▄ ▀
█▀▀▀▀▀█ ▄▀▄▀ ▀ ▄█▄██
█ ███ █ █▄ █▄█▄▄▀▄ ▀
█ ▀▀▀ █ ▀█ ▄█▄█▀▄▄█
▀▀▀▀▀▀▀ ▀▀ ▀ ▀ ▀