using System.Drawing;
using System.IO;
int w = 100;//设定宽度
int h = 100;//设定高度
System.IO.FileStream fs = System.IO.File.Open("图片路径", System.IO.FileMode.Open);
byte[] b = new byte[fs.Length];
fs.Read(b, 0, (int)fs.Length);
MemoryStream ms = new MemoryStream(b);
Image i = new Bitmap(ms, true);
Image ii = new Bitmap(i, new Size(w, h));
ii.Save(Response.OutputStream, Imaging.ImageFormat.Jpeg);
fs.Close();