ArgumentException on reading an OLE image from an MS Access database in .NET
问题 I am trying to read an image from an Access database. It reads the bytes but it gives an unhandled System.ArgumentException when I try to use Image.FromStream . Here is my code : private Image ReadImageFromDB() { Image fetchedImg; if (rownumber >= 0) { byte[] fetchedimgbytes = (byte[])localDataTable.Rows[5]["Object"]; MemoryStream stream = new MemoryStream(fetchedimgbytes); fetchedImg= Image.FromStream(stream); return fetchedImg; } else { MessageBox.Show("no image"); return null; } } 回答1: I