Skip to content

Image to to Stream of Byte[]?

Majid Bhutta

Asked Nov 27, 2005, 11:20 PM EST1 answer
Share
LinkedInX


I have an image in the pictureBox captured from a device.Now  i want to convert this PicBox.Image to stream of bytes to save it in the DataBase.Plz help me how to convert this image from pictureBox to stream of bytes.I pretty know how to save it in database but having some problem converting the image to stream of bytes from PictureBox.
Thnx in Advance!

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi Majid
    I am not sure if this works. I know from stream to byte[]. This is halfway. Try go to VBCity.com Forum, there are a lot of people who can help you.
     
    code:

    Stream strm = new Stream();

    byte[] byteData = new byte[strm.Length];

    stream.Write(byteData,0,stream.Length);


    den2005

    0