You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fn main() {
let img = image::open("in.png").unwrap();
let decoder = bardecoder::default_decoder();
let results = decoder.decode(&img);
for result in results {
println!("{}", result.unwrap());
}
}
thread 'main' panicked at src\bin\decode.rs:6:31:
called `Result::unwrap()` on an `Err` value: Error decoding QR Code: Could not calculate error distances
Here is the QR code.
QR code was generated using fast_qr library with the following code:
use fast_qr::convert::ConvertError;
use fast_qr::convert::{svg::SvgBuilder, Builder, Shape};
use fast_qr::qr::QRBuilder;
fn main() -> Result<(), ConvertError> {
let qrcode = QRBuilder::new("https://example.com/").build().unwrap();
let _svg = SvgBuilder::default()
.shape(Shape::Square)
.to_file(&qrcode, "out.svg");
Ok(())
}
Then I took a screenshot of the SVG as my method to make it into a PNG file.
The text was updated successfully, but these errors were encountered:
Used the example code:
this is bin/decode.rs
It should decode to https://example.com
I get the error:
Here is the QR code.
QR code was generated using fast_qr library with the following code:
Then I took a screenshot of the SVG as my method to make it into a PNG file.
The text was updated successfully, but these errors were encountered: