cozmo / jsQR

A pure javascript QR code reading library. This library takes in raw images and will locate, extract and parse any QR code found within.
https://cozmo.github.io/jsQR/
Apache License 2.0
3.63k stars 600 forks source link

Checksums? #212

Closed uncovery closed 2 years ago

uncovery commented 2 years ago

Hi, I tried another JS QR code library and that would sometimes return faulty text (one letter different etc), so I wanted to know if this one has a checksum functionality included or not.

thanks!.

danimoh commented 2 years ago

QR codes include additional data for error correction. The error correction level can be configured when creating a qr code. Higher error correction capabilities come at the cost of larger QR codes / more dense QR codes which might be harder to read. So there's a sweet spot. But that just as a sidenote.

Yes, this project makes use of the error correction feature and generally works pretty well. In case you've been trying LazarSoft/jsqrcode (another popular lib): from my testing and diving into the code, that lib is a rather poor implementation. See here for a benchmark and alternatives.

uncovery commented 2 years ago

Thanks, the one you mentioned is exactly the one I have issues with ....

Thanks for your quick reply, I will check among the alternatives listed in that other projects what fits my needs.