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?
 
Back
Top