Solved

Converting from byte[] to an image

Posted on 2006-07-18
3
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

626 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