标签:hit 客户端 ref EDA 生成二维码 TE csdn control uri
QRCoder
<img src="/Controller/GetImg"/>
public ActionResult GetImg()
{
string authorizeUrl="";
string authorizeCode = Guid.NewGuid().ToString();
//生成二维码
string url = $"{authorizeUrl}?authorizeCode={authorizeCode}";
QRCodeGenerator qrGenerator = new QRCoder.QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode(url, QRCodeGenerator.ECCLevel.Q);
QRCode qrcode = new QRCode(qrCodeData);
Bitmap qrCodeImage = qrcode.GetGraphic(5, Color.Black, Color.White, null, 15, 6, false);
MemoryStream ms = new MemoryStream();
qrCodeImage.Save(ms, ImageFormat.Jpeg);
return File(ms.ToArray(), "image/jpeg");
}
https://blog.csdn.net/tcjiaan/article/details/7182892
https://www.cnblogs.com/wlays/p/7994393.html
标签:hit 客户端 ref EDA 生成二维码 TE csdn control uri
原文地址:https://www.cnblogs.com/Lulus/p/9182034.html