Does Bitmap.FromHbitmap Copy Memory?

  • Thread starter Thread starter tsteinke
  • Start date Start date
T

tsteinke

I am in the process of creating a System.Drawing.Bitmap from a block of
memory containing a DIB Bitmap. I can think of about a half dozen ways
to do this. For perfomance reasons I don't want to be copying the
enitre bitmap around more than I have to.

Right now I am considering a Pinvoke call to CreateDIBitmap then
passing that handle to
Bitmap.FromHbitmap.

Does anyone know if Bitmap.FromHbitmap actually copies the bits
interally or if it simply sets up some sort of internal handle to the
existing bitmap.

Thanks.
 

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