//取得文件上传的流, 转到Image对象里, 再取得其宽,高
stream = file1.PostedFile.InputStream;
Image img = Image.FromStream(stream);
int iWidth = img.Width;
int iHeight = img.Height;
stream = file1.PostedFile.InputStream;
Image img = Image.FromStream(stream);
int iWidth = img.Width;
int iHeight = img.Height;
//取得文件上传的流, 转到Image对象里, 再取得其宽,高
stream = file1.PostedFile.InputStream;
Image img = Image.FromStream(stream);
int iWidth = img.Width;
int iHeight = img.Height;
如果是前者,将楼上的iWidth ,iHeight 插入到库中