I am trying to convert a picturebox in byte array
MemoryStream s = new MemoryStream();
picProfilePicture.Image.Save(s, System.Drawing.Imaging.ImageFormat.Jpeg);
byte[] pic = s.ToArray();
But when i am using this method i am getting general error in GDI+. How can i fix that?