且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在指定的文件夹中保存图像

更新时间:2022-11-05 08:43:24

尝试:

Try:
ret.Save(Path.Combine(@"C:\Path", "image.jpg"));


最后我这样做谢谢你的帮助...

public int count = 0,n = 0;

Finally i do that thanks for ur help...
public int count=0,n=0;
if(count==1)
                 {
                       using (MemoryStream ms = new MemoryStream())
                       {
                           string img = "Image";
                           string fo = ".jpg";
                           n = n + 1;
                           string n1 = Convert.ToString(n);


                           string imag = string.Concat(img + n1 + fo);
                           bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
                           ret = System.Drawing.Image.FromStream(ms);
                           ret.Save(Path.Combine(@"D:\Anand", imag));
                           count = 0;

                       }
                   }


Tnq ...

我工作了最后的商店仅捕获图像...

我想存储所有捕获的图像..
Tnq...
I Works t i store the last captured images only ...
I want to store all the captured images..