Converting from byte[] to an image

I have images stored in a datatable as Byte []. I would like to retrieve these pictures and display them in a picture box.
lgropperAsked:
Who is Participating?
 
ZeonFlashCommented:
Whoops, forgot:

       Dim byteBLOBData() As Byte
0
 
ZeonFlashCommented:
'Get the byte data of the image
byteBLOBData = dsImage.Tables(0).Rows(0)("Image")

'Create a new memory stream with the byte array data
Dim stmBLOBData As New MemoryStream(byteBLOBData)

'Update the picturebox image with the stream data
picBLOB.Image = Image.FromStream(stmBLOBData)
0
 
lgropperAuthor Commented:
Works perfect. Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.