I want to add My logo to a QR Code and I am using the following library - Qrcodejs.
And I am using the following code -
var qrcode = new QRCode(re, {
text: inp.value,
width: 200,
height: 200,
colorDark : "#5868bf",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
I researched on how to add logo, but got the results for other libraries, but I want this library only.
You can do it yourself:
Or try:
this.qrcode = new QRCode(document.getElementById('qrcode'), {
logo: logoLink,
text: link,
width: 256,
height: 256,
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H,
logoWidth: undefined,
logoHeight: undefined,
logoBackgroundColor: '#ffffff',
logoBackgroundTransparent: false,
});