Bacon / BaconQrCode

QR Code Generator for PHP
BSD 2-Clause "Simplified" License
1.86k stars 212 forks source link

Add logo #90

Closed joeworkman closed 2 years ago

joeworkman commented 3 years ago

Does anyone know if it's possible to add a logo or text in the middle of the QR code? Preferably using the SVG plugin.

DASPRiD commented 3 years ago

The easiest thing would be to simply run the resulting SVG code through an SVG library and simply overlay a logo or text with a white background on top of the QR code (making sure to not cover too much data points).

joeworkman commented 3 years ago

I'm a QR noob... I assumed that you could not cover any of it at all.

DASPRiD commented 3 years ago

No, QR codes contain error correction data. The amount of redundant data depends on the selected error correction level. The highest level (H) can sustain a loss of up to 30%.