Open 0xhex opened 4 years ago
The Login
method for the type *whatsapp.Conn
writes the QR Code data into a string channel. You can use this channel to generate a QR Code Image and save it to a file. The login example shows how to handle the QR Code data using a goroutine and the terminal. The same concept can be applied to an image based approach.
Use
github.com/skip2/go-qrcode
To visualize the QR code to PNG.
Yo hice lo siguiente:
terminal := qrcodeTerminal.New()
qrCode := <-qr
terminal.Get(qrCode).Print()
qrToImg(qrCode)
func qrToImg(qrCode string) {
err := qrcode.WriteFile(qrCode, qrcode.Medium, 256, "qr.png")
if err != nil {
fmt.Fprintf(os.Stderr, "No se pudo crear el archivo de imagen QR")
}
}
how to show QR.png in go window form using github.com/lxn/walk... any solution...
Hello,i couldn't find the qr code string in source. I want to save qr code image as a file,i dont want to show it in terminal Any help?