Robogal
Robogal

Reputation: 99

Get Bitmap Handle (IntPtr) from byte[] using C# .net

I have a byte[]. It contains data of an image (jpeg or bitmap) with all the header info.

How can I create a bitmap from that byte[] , and obtain a handle to that bitmap?

The important point is, I need to get a handle to that bitmap. The handle I need to get is of type IntPtr.

Upvotes: 2

Views: 3977

Answers (1)

leppie
leppie

Reputation: 117320

new Bitmap( new MemoryStream(bytes)).GetHbitmap()

?

Upvotes: 7

Related Questions