日期:2014-05-17 浏览次数:20458 次
HttpPostedFile file = context.Request.Files["file"];
if (file != null)
{
context.Response.ContentType = "text/image";
using (Image img = Image.FromStream(file.InputStream))
{
img.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
}
}