How to save PictureBox.Image to file?
You may use,
pictureBox.Image.Save(stream,System.Drawing.Imaging.ImageFormat.Jpeg);
Example:
System.IO.MemoryStream ms = new System.IO.MemoryStream();
pictureBox1.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
byte[] ar = new byte[ms.Length];
ms.Write(ar, 0, ar.Length);
Try this
pictureBox.Image.Save(@"Path",ImageFormat.Jpeg);
Use below code for save into custom location
using (SaveFileDialog saveFileDialog = new SaveFileDialog() {Filter = @"PNG|*.png"})
{
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
pictureBox.Image.Save(saveFileDialog.FileName);
}
}