Using C#, I\'m trying to load a JPEG file from disk and convert it to a byte array. So far, I have this code:
static void Main(string[] args) { System.Wi
public byte[] imageToByteArray(System.Drawing.Image imageIn) { MemoryStream ms = new MemoryStream(); imageIn.Save(ms,System.Drawing.Imaging.ImageFormat.Gif); return ms.ToArray(); }