当我打开一个图像文件,处理后想覆盖保存时。系统老是提示generic error occurred in GDI+主要代码如下:
Bitmap bm = (Bitmap)Bitmap.FromFile(openFileDialog.FileName, false);
CurrentPath = openFileDialog.FileName;
this.pictureBox1.Image.Save(CurrentPath);打开文件后,到相应的文件夹去修改该文件的文件名也不行,我想可能是因为文件没有关闭
的原因,文件处于写保护状态。想打开读取完问文件后就关闭它,不知道用什么函数。