journeyapps / zxing-android-embedded

Barcode scanner library for Android, based on the ZXing decoder
https://journeyapps.com/
Apache License 2.0
5.74k stars 1.27k forks source link

Library doesn't find the QR Code in the bitmap it saved when it found it on the camera #637

Open gmamessier opened 3 years ago

gmamessier commented 3 years ago

Description of the problem:

Hello ! I don't know if this is an issue with the library but we never know and I don't find any solution..

What I do: 1 - I scan a QR code with my phone 2 - The library find it 3 - I save the bitmap I find in BarcodeResult class getBitmap() 4 - I display the image in another screen 5 - I try to scan the image to find a QR code (which the library found when scanning with camera) 6 - The library doesn't find the QR code in the image and I don't know why..

I try to scan an image the library already scanned 'cause I want to be able to crop the image (with simplecropview) if the library don't find any code. But it doesn't work even with a code already found...

I tried with TRY_HARDER mode, with different Binarizer, rotating image, nothing works. I don't understand why I can't find the qr code in the image though I found it when scanning with the camera..

(Scanning an image works with big qr code) Do you have any idea or someone already done it ?

Which library version are you using? E.g. 3.2.0. 3.4.1 Which phone/tablet are you using, and which Android version does it run? (e.g. Samsung Galaxy S5, Android 5.0) One Plus 6t, Android 10

Can you reproduce the issue in the sample project included with the library? If not, can you provide your own sample project or sample code that produces this error?