mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
all tests except SA pass
This commit is contained in:
@@ -150,8 +150,16 @@ impl MultiUseMultiFormatReader {
|
||||
image.get_black_matrix_mut().flip_self();
|
||||
let res = self.decode_formats(image);
|
||||
if res.is_ok() {
|
||||
return res;
|
||||
let mut r = res.unwrap();
|
||||
r.putMetadata(
|
||||
crate::RXingResultMetadataType::IS_INVERTED,
|
||||
crate::RXingResultMetadataValue::IsInverted(true),
|
||||
);
|
||||
return Ok(r);
|
||||
}
|
||||
// if res.is_ok() {
|
||||
// return res;
|
||||
// }
|
||||
}
|
||||
Err(Exceptions::NOT_FOUND)
|
||||
}
|
||||
@@ -177,11 +185,11 @@ impl MultiUseMultiFormatReader {
|
||||
for possible_format in self.possible_formats.iter() {
|
||||
let res = match possible_format {
|
||||
BarcodeFormat::QR_CODE => {
|
||||
let a = self.qr_code_reader.decode_with_hints(image, &self.hints);
|
||||
let a = self.cpp_qrcode_reader.decode_with_hints(image, &self.hints);
|
||||
if a.is_ok() {
|
||||
a
|
||||
} else {
|
||||
self.cpp_qrcode_reader.decode_with_hints(image, &self.hints)
|
||||
self.qr_code_reader.decode_with_hints(image, &self.hints)
|
||||
}
|
||||
}
|
||||
BarcodeFormat::MICRO_QR_CODE => {
|
||||
@@ -214,10 +222,10 @@ impl MultiUseMultiFormatReader {
|
||||
return Ok(res);
|
||||
}
|
||||
}
|
||||
if let Ok(res) = self.qr_code_reader.decode_with_hints(image, &self.hints) {
|
||||
if let Ok(res) = self.cpp_qrcode_reader.decode_with_hints(image, &self.hints) {
|
||||
return Ok(res);
|
||||
}
|
||||
if let Ok(res) = self.cpp_qrcode_reader.decode_with_hints(image, &self.hints) {
|
||||
if let Ok(res) = self.qr_code_reader.decode_with_hints(image, &self.hints) {
|
||||
return Ok(res);
|
||||
}
|
||||
if let Ok(res) = self
|
||||
|
||||
Reference in New Issue
Block a user