mebjas / html5-qrcode

A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org
https://qrcode.minhazav.dev
Apache License 2.0
4.9k stars 959 forks source link

Scanning 1D barcodes on iPhone's #423

Open tomurphy-78 opened 2 years ago

tomurphy-78 commented 2 years ago

Hi

I am trying to scan 1D barcodes, using the demo page. On android devices using chrome, it scans really well. It also scans well on older iPhones using safari. However on newer iPhones using both safari and chrome, it rarely scans the 1D barcode and sometimes not at all, it looks like the camera is having trouble recognising it??

One example phone is.. iPhone 13 pro max, iOS version 15.2.1

Have you or anyone seen this behaviour? And have been able to fix it?

I also posted on your blog before seeing this page, so apologies for the double post.

Cheers Tom

mebjas commented 2 years ago

You are right, it seems to work on Pixel but doesn't scan on latest iphone - I'll look into this, thanks for posting.

iamsrujal commented 2 years ago

I have checked with iphone 13 pro with IOS version 15.3.1.

Used this website to generate 1d barcode https://poscatch.com/barcode-generator/

Barcode scanning works perfectly fine for me.

alexander-rieder commented 2 years ago

for me Barcode Scanning only works on the pc using a webcam or by file upload (also only on pc)

on iOS and Android I cant scan the barcode...

I attached the "problematic" barcode

itf_barcode

Edit: I just noticed that if the barcode content exceeds a specific length, it can't be scanned with the iphone or android.

Working barcode: https://barcode.tec-it.com/de/Code25IL?data=13418758004 Non-working barcode: https://barcode.tec-it.com/de/Code25IL?data=13418758004439567

ROBERT-MCDOWELL commented 2 years ago

I think the issue is the black touching the bar code at the top. with a conventional infrared scanner it's not a problem since the field scanned is an horizontal line. with a camera it's more complex, it depends to the camera quality and focus. did you try with another bar code without this black top?