Open rob-lutrons opened 4 years ago
Oh, and I'm able to decode the image using https://zxing.org/
Because of https://github.com/cozmo/jsQR/blob/master/src/binarizer/index.ts#L100-L104 jsQR cannot handle images smaller than 33x33 pixels. (This should probably be documented?) Passing an image with single-pixel modules on a 33x33 white background works fine. Do remember also that there must be a one-module-wide white margin around the code.
Oh interesting, this isn't a case we'd though of I don't think. I think rather than documenting it might make sense to instead just pad the image before the binarize step...
Hi,
I have a 1D bit array which represents entire QR code, including finder modules. I tried converting to RGBa bitmap 1 -> 0,0,0,255 and 0 -> 255,255,255,255 so I could pass it to jsQR. jsQR finds nothing.
When I write the bitmap to file, it looks fine visually and looks like the actual QR code its based on.
Is this the right approach? Is there a function I can just pass the raw data to?
I'm working on a nodeJS solution.
Thanks.
Here's a zoomed in view of the output image...![image](https://user-images.githubusercontent.com/48070705/82328760-27ec3a80-99d8-11ea-99e5-a189d670b30c.png)