16 lines
397 B
Rust
16 lines
397 B
Rust
extern crate qrcode;
|
|
|
|
use qrcode::render::svg;
|
|
use qrcode::{EcLevel, QrCode, Version};
|
|
|
|
fn main() {
|
|
let code = QrCode::with_version(b"01234567", Version::Micro(2), EcLevel::L).unwrap();
|
|
let image = code
|
|
.render()
|
|
.min_dimensions(200, 200)
|
|
.dark_color(svg::Color("#800000"))
|
|
.light_color(svg::Color("#ffff80"))
|
|
.build();
|
|
println!("{}", image);
|
|
}
|