How do I create a Stream object from a Bitmap

  • Thread starter Thread starter Bill Fuller
  • Start date Start date
B

Bill Fuller

I have a need to write a Bitmap to a Stream, but get an error message on all
my attempts. I am doing something like the following:

Stream _appImage;

public frmCustomerFeedback(Bitmap bm)
{
InitializeComponent();

bm.Save(_appImage, System.Drawing.Imaging.ImageFormat.Jpeg); <== this
fails
//bm.Save("testimg.jpg", System.Drawing.Imaging.ImageFormat.Jpeg); <==
this works
ugPictureBox.Image = bm;
}

Any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top