How to convert System.Drawing.BitMap to Byte[]?

  • Thread starter Thread starter david
  • Start date Start date
david said:
As Title.

Thanks in advance.

Use the inherited Image.Save method and save it to a MemoryStream which
you can then call ToArray on.
 
You can query the BitmapData which has a pointer in it. This requrires
unsafe code, but you can access the bitmap bits directly.
 

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