endroid / qr-code

QR Code Generator
https://endroid.nl
MIT License
4.45k stars 726 forks source link

Adding logo, hides part of the qr code #339

Closed syntaxgirl closed 3 years ago

syntaxgirl commented 3 years ago

When I add logo, it hides the middle part of the qr code. Is there a way to handle this?

janssens commented 3 years ago

Same here, I'll look for a workaround

janssens commented 3 years ago

The way it works for me is setting a high level of correction and having a small logo.

endroid commented 3 years ago

Hi @syntaxgirl the logo indeed overlaps part of the QR code. What exactly is your expected behavior?

mstnorris commented 3 years ago

@syntaxgirl it shouldn't be an issue to add an image.logo that obscures part of the QR code due to error correction. See https://en.wikipedia.org/wiki/QR_code#Error_correction

You can check out https://fussyfork.com and the QR codes we generate with our logo in the middle and they scan just fine.

I'd be happy to share the calculation we're using to adjust the size so that the logo sits neatly in the middle without overlapping a portion of a block should that be useful to you?