Crate qrcode [−] [src]
QRCode encoder
This crate provides a QR code and Micro QR code encoder for binary data.
extern crate image; extern crate qrcode; use image::GrayImage; use qrcode::QrCode; let code = QrCode::new(b"Some content here."); match code { Err(err) => panic!("Failed to encode the QR code: {:?}", err), Ok(code) => { let image: GrayImage = code.render().min_width(100).to_image(); // render `image`... } }
Reexports
pub use types::{QrResult, EcLevel, Version}; |
Modules
bits |
The |
canvas |
The |
ec |
The |
optimize |
Find the optimal data mode sequence to encode a piece of data. |
render |
Render a QR code into image. |
types |
Structs
QrCode |
The encoded QR code symbol. |