Solved

Converting from byte[] to an image

Posted on 2006-07-18
3
194 Views
Last Modified: 2010-04-23
I have images stored in a datatable as Byte []. I would like to retrieve these pictures and display them in a picture box.
0
Comment
Question by:lgropper
  • 2
3 Comments
 
LVL 17

Expert Comment

by:ZeonFlash
ID: 17131470
'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
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 500 total points
ID: 17131476
Whoops, forgot:

       Dim byteBLOBData() As Byte
0
 

Author Comment

by:lgropper
ID: 17132024
Works perfect. Thank you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now