I use the following to write jpgImage to a PictureBox.Image.
var jpgImage = new Byte[jpgImageSize];
...
pictureBox.Image = new Bitmap(new MemoryStream(jpgIma
Try this
pictureBox.Image.Save(@"Path",ImageFormat.Jpeg);
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);