解决方案 »

  1.   


                        Image img = m_srcImgList[strKey];
                        file = new FileStream(strPath, FileMode.Create, FileAccess.Write);
                        img.Save(file, img.RawFormat);
    这几行上断点调试下
      

  2.   

    应该在 img.Save(file, img.RawFormat);出现通常是保存的格式不对
      

  3.   

    file = new FileStream(strPath, FileMode.Create, FileAccess.Write);
    img.Save(file, img.RawFormat);
    设置断点调试运行,肯定是某个文件没有正确的create在保存的时候报这种异常。
      

  4.   

    这个错误可能是在C盘上无法建立目录引起的(win7等无权限建立),你把C盘修改为其它盘,或程序当前目录试一下,    strPath = @"C:\" + strPath;