html directly loads the QR code image

<html>
    <body>
        <img width="100px" height="100px;" src="data:image/jpg;base64, the string converted from the QR code image" />
    </body>

</html>

QR code string to image: (axis.jar)

String qrCodeStr = "..."; //QR code string

String qrCodeUrl = "/Users/test";//The storage path of the QR code image

byte[] buf=Base64.decode(qrCodeStr);

try {
    FileOutputStream fos = new FileOutputStream(qrCodeUrl);
    fos.write(buf);
    fos.close();
} catch (Exception e) {

    ......

}


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325734727&siteId=291194637