将图片流输出到界面mvc

System.Drawing.Image _CodeImage = _Code39.GetCodeImage(OrderNo, Code39.Code39Model.Code39Normal, true);
System.IO.MemoryStream _Stream = new System.IO.MemoryStream();
_CodeImage.Save(_Stream, System.Drawing.Imaging.ImageFormat.Jpeg);

string strUrl = "data:image/gif;base64," + Convert.ToBase64String(_Stream.ToArray());
_CodeImage.Dispose();
_Stream.Dispose();
listOrders[0].TwmHtml = strUrl;

上一篇:Erlang/Elixir: 使用 OpenCV, Python 搭建图片缩略图服务器


下一篇:HDU1213