open bitmap, data from a byte()

Posted on 2006-06-02
Last Modified: 2010-04-23

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)

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.....)


Question by:Ruttensoft
    1 Comment
    LVL 1

    Accepted Solution

    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)


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    760 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

    9 Experts available now in Live!

    Get 1:1 Help Now