- SAS barcodes seem to be flipped (which is enough to break PDF417 decoding)
- EW produces some very distorted aztec codes
GfxState::ctm has the transformation, applying that to the extracted image should fix that.
GfxState::ctm has the transformation, applying that to the extracted image should fix that.
+++ b/src/extractorengine.cpp
@@ -145,7 +145,11 @@ QString BarcodeJsApi::decodePdf417(const QVariant &img) const
tf.rotate(-90); image = image.transformed(tf); }
+ QString value = BarcodeDecoder::decodePdf417(image);
+ if (!value.isEmpty()) {
+ return value;
+ }
+ return BarcodeDecoder::decodePdf417(image.mirrored(false,true));
} return {};
}
Yep. This gives me results. but.
Implemented, but it only fixes the EW case. SAS actually displays the codes flipped in the PDF, so this needs to be fixed on the barcode decoder level. Adding a new ticket for that.