3
我有下面的代码,我希望它保存为jpeg文件格式,而不是bmp。修改代码保存为jpeg
Bitmap current = (Bitmap)_latestFrame.Clone();
using (SaveFileDialog sfd = new SaveFileDialog())
{
sfd.Filter = "*.bmp|*.bmp";
if (sfd.ShowDialog() == DialogResult.OK)
{
current.Save(sfd.FileName);
}
}
current.Dispose();
}
你对我应该改变什么有什么想法吗?我尝试使用Image.Format,但没有奏效。
微软文档这口井,结合实例http://msdn.microsoft.com/en-us/library/ytz20d80%28v=vs.110%29.aspx – Hogan
您是否尝试过使用简单'.jpg'作为文件扩展名? –