I have a table that has a image data type. Object mapper sees it as a byte[].
Here is my code to retrieve it.
RdbQuery query = new RdbQuery(typeof(MemberDocument));
query.AddClause(
MemberDocument.DocumentIdEntityColumn, EntityQueryOp.EQ, id);
MemberDocument document = myPM.GetEntity<MemberDocument>(query);
byte[] imageData = document.DocumentImage;
MemoryStream mem = new MemoryStream(imageData);
return mem;
In my form I have the following
MemoryStream mem = myController.GetScannedImageById(id);
pictureBox1.Image =
Bitmap.FromStream(mem);
I keep getting a parameter not valid when it tries to display it in the picture box. Am I retrieving it properly and assigning it properly to a memorystream?
Bill