I have a stored procedure that return a varbinary(max) type data. I want to convert that data into an Image.
But I have problems with this line:
public Image CargarAvatar(string login)
{
System.Object[] Args = new System.Object[1];
Args[0] = login;
DataTable X = new DataTable();
X = TraerDataTable("sp_CargarAvatarUsuario", Args);
byte[] ImagemByte = Convert.to (X.Rows[0][0].ToString());
MemoryStream ms = new MemoryStream();
Image returnImage = Image.FromStream(ms);
return returnImage;
}
Please help! :D