开发者

i want to save a image with out user interaction in C#

I m scanning ima开发者_高级运维ge in a form i want to save the image with out user interaction in C# can any one help..

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);


Use IO to check if the current file exists, and if so delete it first. See: System.IO documentation

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


Load the Image File to Stream ,than you can Create Bitmap from Stream ,which will close the File Read Operation in source Image .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜