//保存图象文件
private void SaveImage(Image image)
{
if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
{
string fileName = saveFileDialog.FileName;
string extension = Path.GetExtension(fileName);
if (extension == ".jpg")
{
image.Save(fileName, ImageFormat.Jpeg);
}
else
{
image.Save(fileName, ImageFormat.Bmp);
}
}
}
新闻热点
疑难解答