Closed mattx95 closed 3 years ago
Yeah it makes no sense to have an image when the image simply removes parts of the QR code. Have it been working before?
Yea the allowable space estimate is a really rough approximation of what the error correction can compensate for. I've hit this too. That's why I ended up with this comment: https://github.com/zpao/qrcode.react/blob/cadda9de2a1cb838ea36264e4b4c14a91b059489/src/index.js#L97-L100
I decided it was too complex to actually calculate the allowable area that could be covered so it's ultimately up to users to determine the right sizes and image to use. I strongly recommend specifying and adjusting the dimensions you pass for the image, and potentially even bumping up the error correction level, which will result in better ability for readers to still decode.
I noticed that the QR code stops working (my phone no longer recognizes it) when the
excavate
property isTrue
. Setting it toFalse
fixes the issue, but looks a little worse (I'm adding an image to the QR code center, so without excavate there's no padding).