i have a database with an image filed.I have read this Image field and convert to byte array with code below.
imageByte = ((dtgrid.CurrentRow.Cells[2].Value) as System.Data.Linq.Binary).ToArray();
When I Create a stream and Assign it to PictureBox image like this:
MemoryStream ms = new MemoryStream(imageByte);
pictureBox1.Image = Image.FromStream(ms);
I have this error:
Parameter is not valid.
How Can I fix this.