Hi , i want to save the image from the database to an physical location like C:\one.JPG. the datatype of the column in the table is Image. i tried with working with MemoryStream. but i am not suceed. i am getting "Parameter not valid" when converting the stream to image "Image.fromStream(ms,true)".
DataView dv = new DataView(ds.Tables, null, null, DataViewRowState.CurrentRows);
byte imageData =(Bytes) dv;
//Read image data into a memory stream
using (MemoryStream ms = new MemoryStream(imageData, 0, imageData.Length))
ms.Write(imageData, 0, imageData.Length);
//Set image variable value using memory stream.
newImage = Image.FromStream(ms, true);