public ActionResult GetAddressQR(string bitcoinAddress) { BitcoinAddress.Create(bitcoinAddress); //anti ddos QrCodeImgControl control = new QrCodeImgControl(); control.QuietZoneModule = Gma.QrCodeNet.Encoding.Windows.Render.QuietZoneModules.Zero; control.ErrorCorrectLevel = Gma.QrCodeNet.Encoding.ErrorCorrectionLevel.H; control.BackColor = System.Drawing.Color.White; control.Width = 200; control.Height = 200; control.Text = bitcoinAddress.ToString(); Bitmap bitmap = new Bitmap(control.Width, control.Height); control.DrawToBitmap(bitmap, new Rectangle(0, 0, control.Width, control.Height)); var bytes = ImageToByte2(bitmap); return(this.File(bytes, "image/jpeg")); }