mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
fix: correct error related to GenericMultipleBarcodeReader
This error occured in some cases during decode for an image with many barcodes spread througout.
This commit is contained in:
@@ -23,3 +23,27 @@ fn issue_28() {
|
||||
);
|
||||
rxing::helpers::detect_multiple_in_file_with_hints("test_resources/blackbox/github_issue_cases/226611447-be6041dc-5b21-42fe-827b-068ccc59082c.png", &mut hints).unwrap_or_default();
|
||||
}
|
||||
|
||||
#[cfg(feature = "image")]
|
||||
#[test]
|
||||
fn dynamsoft_all_supported_formats_image_fault() {
|
||||
use rxing::DecodingHintDictionary;
|
||||
|
||||
let mut hints: DecodingHintDictionary = DecodingHintDictionary::new();
|
||||
hints.insert(
|
||||
rxing::DecodeHintType::TRY_HARDER,
|
||||
rxing::DecodeHintValue::TryHarder(true),
|
||||
);
|
||||
let results = rxing::helpers::detect_multiple_in_file_with_hints(
|
||||
"test_resources/blackbox/multi-1/AllSupportedBarcodeTypes.png",
|
||||
&mut hints,
|
||||
)
|
||||
.expect("must not fault during read");
|
||||
|
||||
assert!(
|
||||
results.len() >= 11,
|
||||
"regression detection, base count of 11 codes"
|
||||
);
|
||||
|
||||
// ToDo: This test is incomplete. Some that should be detected aren't, and some that are detected shouldn't be.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user