The qrcodes pkg does not support embedding images or logos within a QR code. After investigating, it turns out logos are not even part of the QR code spec.
I was disappointed to see that the qrcode package gives no way to insert an image into the center of the QR code. But in fact it turns out that QR codes cannot be made to have an alternate center. QR codes are simply spec’d to have 30% redundancy. So you can simply overwrite up to 30% of a QR code arbitrarily and it will still decode as long as you don’t mess with the boxes on the 4 corners.
Also worth noting that you can exceed 30% interference if you play games with colors. That is, if a transparent pic uses sufficiently light colors that pass as white (in a black vs white dithering algo), then those pixels obviously don’t count in the 30% tolerance. So some quite clever work could exploit this to make a QR code look less like a pixel blob.
I guess the gripe that I have is that redundancy is fixed at 30% for all QR codes, IIUC.
In principle, we should be able to generate a code with 50% redundancy and then clobber up to 50% of it.
The spec allows only 4 error correction levels (L, M, Q, H) so no more than 30% redundancy. These are indicated as the first 2 bits below the left-top finder pattern and tell the reader which coefficients to use in the error correction equation and how far a solution could be. The percentage is approximate and pertains to full bytes, not bits. Also, non-data areas (finder patterns, as well as 1px stripes around the big finder patterns and between them) are not redundantly encoded so you have to be careful with those.