我M在表格扫描图像我想保存在C#进行用户交互的图像任何一个可以帮助..我想保存在C#进行用户交互图像
string chktemp = @"C:\"+pic+".tif";
Bitmap bm= new Bitmap(from file);//Here it is asking already saved file with out this i want to save just now scanned image from form
bm.Save(chktemp);
我M在表格扫描图像我想保存在C#进行用户交互的图像任何一个可以帮助..我想保存在C#进行用户交互图像
string chktemp = @"C:\"+pic+".tif";
Bitmap bm= new Bitmap(from file);//Here it is asking already saved file with out this i want to save just now scanned image from form
bm.Save(chktemp);
使用的IO检查当前文件是否存在,如果是,则先删除它。 见:System.IO文档
File.Exists http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx
File.Delete http://msdn.microsoft.com/en-us/library/system.io.file.delete.aspx
加载镜像文件流时,比你可以从流创建位图,这将关闭该文件中读取在源图像中操作。
我试过了代码,它并没有要求任何确认,注意:将图像保存到它所构建的相同文件是不允许的,并引发异常。 http://msdn.microsoft.com/en-us/library/ktx83wah.aspx – Vamsi