C#_PICTUREBOX图片保存到本地

SaveFileDialog saveFileDialog = new SaveFileDialog();

saveFileDialog.Filter = "Image files (*.jpg)|*.jpg";

saveFileDialog.FilterIndex = 0;

saveFileDialog.RestoreDirectory = true;

saveFileDialog.Title = "导出文件保存路径";

saveFileDialog.FileName = null;

saveFileDialog.ShowDialog();

string strPath = saveFileDialog.FileName;

Image img = pictureBox1.Image;

img.Save(strPath);

你可能感兴趣的:(C#_PICTUREBOX图片保存到本地)