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.67k stars 606 forks source link

Is there a maximum resolution for images that can be decoded? #101

Open gruhn opened 5 years ago

gruhn commented 5 years ago

It seems to me that jsQR fails to decode images at some high resolution. I tested this with a few images. Scaling the same images down before passing the image data to jsQR seems to work. Check out this fiddle:

https://jsfiddle.net/4rf1975s/1/

Is this behavior intended? If so, what exactly is the maximum possible resolution?

PS: maybe the link to the image I included in the demo will break at some point. For reference:

the original image
emj365 commented 5 years ago

the same problem here it doesn't work with iPhone camera photo but works with resized one in 600px width

dirkbolte commented 4 years ago

Same issue here with google chrome on android (Pixel 2) and MacOS. The original image was about 4000x3000 - and fails to parse on either platform. Decreasing width to 1024 (and height proportionally) makes it work on Chrome/MacOS but still fails on Android.

Scaling it down to width=500 makes it work on both platforms.