public static void ImageToByteArrayFromFilePath(string str) { byte[] byteArrayIn = File.ReadAllBytes(str); MemoryStream ms = new MemoryStream(byteArrayIn); // Here I'm getting 'Parameter is not valid' ms.Seek(0, SeekOrigin.Begin); System.Drawing.Image img = System.Drawing.Image.FromStream(ms); img.Save("C:\\Users\\Guest\\Desktop\\NewImg.jpg"); }
File.ReadAllBytes()
ImageToByteArrayFromFilePath
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)