I am trying to use this library for generating QR code. I am calling qrcode.PNG() function to get bytes of qrcode in PNG form.
But the problem is, i am not getting consistent results from this lib.
Below is my code:
qcode, err := qrcode.New("CONTENT-TO-BE-USED", qrcode.Medium)
if err != nil {
fmt.Println(err)
}
b, err := qcode.PNG(100) // tried different sizes like 256, 140, 130, and 100
if err != nil {
fmt.Println(err)
}
t.QRCode = string(b)
here t.QRCode is used in html template with image tag to load qr code on web page.
I am trying to use this library for generating QR code. I am calling qrcode.PNG() function to get bytes of qrcode in PNG form. But the problem is, i am not getting consistent results from this lib.
Below is my code:
here
t.QRCode
is used in html template with image tag to load qr code on web page.Anything is wrongly done here?