-
ThoughtWorks.QRCode二维码生成库现已更新以支持中文
资源介绍
今天刚刚编译的二维码类库,绝对支持中文!
使用方法(先引用dll) 示例:
QRCodeEncoder qrCodeEncoder = new QRCodeEncoder();
qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;
qrCodeEncoder.QRCodeScale = 4;
qrCodeEncoder.QRCodeVersion = 8;
qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M;
String data ="Hello 二维码!";
System.Drawing.Bitmap image = qrCodeEncoder.Encode(data);
System.IO.MemoryStream MStream = new System.IO.MemoryStream();
image.Save(MStream, System.Drawing.Imaging.ImageFormat.Gif);
Response.ClearContent();
Response.ContentType = "image/Gif";//png , jpg都可
Response.BinaryWrite(MStream.ToArray());