Closed wwq0071 closed 1 year ago
It happens to me, too, quite often
Which platform ? Windows 32? Winows 64? IOS? Or Android?
Which platform ? Windows 32? Winows 64? IOS? Or Android?
My problem appears in Android,1D or 2D encountered
On Windows and IOS64 it works.
I don't have an Android here to test. That has to wait.
Do you use PURE_BARCODE ? Like:
hints := TDictionary<TDecodeHintType, TObject>.Create(); hints.Add(TDecodeHintType.PURE_BARCODE, nil); result := Decode('problem-qr-android 64bit.png', TBarcodeFormat.QR_CODE, hints);
If you do can you try again without this option?
Which platform ? Windows 32? Winows 64? IOS? Or Android?
On Windows 32 or 64.
you can try "vclTestApp" this demo to build it with win32. and use the QR Code Pictures I provided to test!
Hi,
I provided an update.
The cause of this over flow bug is in the EAN decoder. What exacly the cause of this bug is is unknown. I fixed it by eating the exception. It will happen only once when scanning the same type of barcodes. If there is an attached Delphi debugger the exception will still be thrown in the IDE.
Some extra information: When the decoder is set to TBarcodeFormat.Auto then all the available 1D decoders (Like EAN, Code128) and then all 2D decoders (QRCode) gets executed in that order until a decode is successfull. If a barcode is successfully decoded then this decoder will be set in the top of the decoder list so when a next scan happens the first decoder will probably be the succesfull decoder.
if you know in front that you only scan QR Codes then you can also set:
result := Decode('q8.png', TBarcodeFormat.QR_CODE);
I close this one. If there are any problems, please reopen.
I can't recognize this picture。it raise an error "Interger overflow" ,and This QR code is legal!!!