//取得文件上传的流, 转到Image对象里, 再取得其宽,高
stream = file1.PostedFile.InputStream;
Image img = Image.FromStream(stream);
int iWidth = img.Width;
int iHeight = img.Height;

解决方案 »

  1.   


    //取得文件上传的流, 转到Image对象里, 再取得其宽,高
    stream = file1.PostedFile.InputStream;
    Image img = Image.FromStream(stream);
    int iWidth = img.Width;
    int iHeight = img.Height;
      

  2.   

    是把图片的长度和高度放到库中还是把图片放在库中、
    如果是前者,将楼上的iWidth ,iHeight 插入到库中
      

  3.   

    贊成樓上的樓上的樓上,Have a try.
      

  4.   

    http://expert.csdn.net/Expert/topic/2048/2048833.xml?temp=.2827112请多看看已解决区。