?
Solved

open bitmap, data from a byte()

Posted on 2006-06-02
3
Medium Priority
?
215 Views
Last Modified: 2010-04-23
Hello

I am coding for the Compact Framework, and for making a screenshot, I get the data into a

If I now save it: (data is the byte() containing the bmp)

Dim fs As FileStream = New FileStream(FileName, FileMode.Create)
fs.Write(data, 0, data.Length)
fs.Flush
fs.Close

Then I get a BMP file

how can I directly load this bmp file into a bitmap without saving it as BMP?

Something like

Dim NewBMP as new Bitmap(..........whathere.....)

Thanks

Sven
0
Comment
Question by:Ruttensoft
1 Comment
 
LVL 1

Accepted Solution

by:
James_Wyatt earned 2000 total points
ID: 16815551
You should be able to load it from the stream i.e.

Dim myStream As New MemoryStream(data)

Dim myImage As Image = Image.FromStream(myStream)

myStream.Dispose()
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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
Suggested Courses

621 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