且构网

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

更改图像保存路径

更新时间:2023-12-03 10:51:22

您的意思是复制文件吗?如果是这样,请参阅 http://msdn.microsoft.com/en-us/library/c6cfw35a.aspx [ ^ ]

我想您的意思是将磁盘上的映像复制到另一个位置,还是将内存中的映像保存到另一个位置?
两者都很容易:
File.Copy(sourcePath, destinationPath);



myImage.Save(destinationPath, ImageFormat.Jpeg);


i want to create a copy of image and save it in another location. Is there a way to do that?

Do you mean copy a file? If so, see http://msdn.microsoft.com/en-us/library/c6cfw35a.aspx[^]


I assume you mean either to copy an image on disk to another location, or to save an image in memory to another location?
Either is easy:
File.Copy(sourcePath, destinationPath);



myImage.Save(destinationPath, ImageFormat.Jpeg);