标签:
QrEncoder qrEncoder = new QrEncoder(ErrorCorrectionLevel.H); QrCode qrCode = qrEncoder.Encode(QueryUrl); GraphicsRenderer renderer = new GraphicsRenderer(new FixedModuleSize(5, QuietZoneModules.Two), Brushes.Black, Brushes.White); string filesrc = System.Environment.CurrentDirectory + Guid.NewGuid().ToString() + ".png"; using (MemoryStream stream = new MemoryStream()) { renderer.WriteToStream(qrCode.Matrix, ImageFormat.Png, stream); //e.Graphics.DrawImage(Image.FromStream(stream), this.centerPosition(this.paperWidth, barcode2d.Size.Width), y, (float)this.barcode2d.Size.Width, (float)this.barcode2d.Size.Height); e.Graphics.DrawImage(Image.FromStream(stream), this.centerPosition(this.paperWidth, 175), y, 175, 175); }
标签:
原文地址:http://www.cnblogs.com/xuguanghui/p/4260210.html