C# 将内存中的图片放到到Response输出到网页

System.IO.MemoryStream ms = new System.IO.MemoryStream();
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
Response.ContentType = "image/png";
Response.Clear();
ms.WriteTo(Response.OutputStream);
Response.End();

posted @ 2012-09-06 20:35  striiiiing  阅读(783)  评论(0编辑  收藏  举报