Results 1 to 2 of 2

Thread: byte array to stream

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870

    byte array to stream

    Hi all,

    I am trying to get from a byte array to a stream reader.....any ideas?

    Here's a longer explanation of what i'm trying to achieve:
    I have an image stored in my database table in binary format. I put the image out of the table and but it in a byte array. I now want to display it on screen using GDI+. The way I figure doing this is by using System.Drawing.Image.FromStream() method call, and creating a Bitmap object. The problem is I can't get from an byte array to a stream.

    Any ideas?

    Cheers
    Nick
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    Could always check the sub-classes of the Stream class...
    Code:
    byte[] myByteArray = null;
    // Load image etc..
    
    MemoryStream myStream = new MemoryStream(myByteArray);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width