I have saved image in SQL database as varbinary but when i tried to retrieve the data and convert it into image to display it in picture box occurs error : ' parameter is not valid '
ImageConverter imageConverter = new System.Drawing.ImageConverter();
byte[] imgByte;
BinaryFormatter bf = new BinaryFormatter();
var ms = new MemoryStream();
bf.Serialize(ms, r.Cells["item_img"].Value);
imgByte = ms.ToArray();
Image image = imageConverter.ConvertFrom(imgByte) as Image;
i want to convert it to image and
set picturebox.image = (convert the data to image)