Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a program which reads raw image data from audio hardware. I am reading the data in unmanaged C++ code. In a managed C++ routine, I have a pointer to an unmanaged unsigned char array.

 

I would like to load a bitmap object with this data so I can display the data by calling the DrawImage method on a Graphics object.

 

How can I transfer an unmnaged 512x1024 unsigned char array into a managed Bitmap object for display? If I dump this memory into a "raw" binary file, I can load the file into Photoshop as an interleaved raw format file, so untimately, I want to see the same image on my form.

 

 

thanks

Bryan

Posted
One of the bitmap constructors wraps the GdipCreateBitmapFromScan0 function. So you can pass the address of your bitmap and the other required information to create a bitmap object.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...