Update Rust crate rxing to 0.7 (#2047)
* Update Rust crate rxing to 0.7 * Fix build Signed-off-by: Dude so hot <djohn@fbi.gov> --------- Signed-off-by: Dude so hot <djohn@fbi.gov> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dude so hot <djohn@fbi.gov>
This commit is contained in:
1 parent
2f044a17e1
commit
ebaf75df95
3 files changed
+7
-16
No files matched your search
Generated
+4
-11
@@ -112,12 +112,6 @@ version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
|
||||
|
||||
[[package]]
|
||||
name = "bit_reverse"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "99528ca30abb9495c7e106bf7c3177b257c62040fc0f2909fe470b0f43097296"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.6.0"
|
||||
@@ -1418,11 +1412,10 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rxing"
|
||||
version = "0.6.4"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d6a67d9437113b225dc74acfdc7a89b7f1ce8fe498de282a5a0b0ae2e09e41e6"
|
||||
checksum = "d94fd9d595e62b2c9ee033626bf28218da9cf3b3196f20d7e2c004a702bda71c"
|
||||
dependencies = [
|
||||
"bit_reverse",
|
||||
"chrono",
|
||||
"chrono-tz",
|
||||
"codepage-437",
|
||||
@@ -1441,9 +1434,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rxing-one-d-proc-derive"
|
||||
version = "0.5.3"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59c92a4da773eed06d54210368684b4325bc70a0f8b0cc4d50a106bf71b954f2"
|
||||
checksum = "6cee044776de75d7df23e58bfbc8799d859c2980ee247bb9bf925e4fd7d8cc6d"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
|
||||
@@ -23,7 +23,7 @@ serde_cbor = "0.11"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
anyhow = "1.0"
|
||||
image = { default-features = false, version = "0.25" }
|
||||
rxing = { default-features = false, version = "0.6" }
|
||||
rxing = { default-features = false, version = "0.7" }
|
||||
ndk = { version = "0.9", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -4,7 +4,7 @@ use anyhow::Result;
|
||||
use image::{GrayImage, ImageBuffer};
|
||||
use rxing::common::HybridBinarizer;
|
||||
use rxing::qrcode::detector::FinderPatternFinder;
|
||||
use rxing::{BinaryBitmap, DecodingHintDictionary, Luma8LuminanceSource, Point};
|
||||
use rxing::{BinaryBitmap, DecodeHints, Luma8LuminanceSource, Point};
|
||||
use std::f32::consts::FRAC_1_SQRT_2;
|
||||
|
||||
fn image_buffer_to_luma8<P: CustomPixel>(
|
||||
@@ -24,9 +24,7 @@ impl ImageConsumer<bool> for QrCode {
|
||||
fn apply<P: CustomPixel>(self, image: &ImageBuffer<P, &[P::Subpixel]>) -> Result<bool> {
|
||||
let source = image_buffer_to_luma8(image);
|
||||
let image = BinaryBitmap::new(HybridBinarizer::new(source));
|
||||
match FinderPatternFinder::new(image.get_black_matrix())
|
||||
.find(&DecodingHintDictionary::new())
|
||||
{
|
||||
match FinderPatternFinder::new(image.get_black_matrix()).find(&DecodeHints::default()) {
|
||||
Ok(info) => {
|
||||
// Check if the region is squarish
|
||||
let top_left = Point::from(info.getTopLeft());
|
||||
|
||||
Reference in new issue
Block a user