(I’m not even sure how to ask this in an correct way, sorry. My image processing skills are basically non existent.)
I have a function in a library (namely bool CLNUIDevice.GetCameraColorFrameRGB32(...) from CL.NUI to read Kinect data) that I have to pass an IntPtr data as an argument. The resulting image data will end up in this data.
I want to do some image processing with that data and display it on screen (in a PictureBox, I guess).
When I pass a variable set to IntPtr.Zero it stays 0. As I understand it, I have to initialize the data correctly. My image is 640×480 pixels and judging from the examples it should have PixelFormat.Format32bppPArgb
How do I have to initialize the IntPtr for a 640×480 pixel bitmap that seems to have 32 bits per pixel?
Create a new Bitmap object, using your width/height/bpp and the image data pointer passed in through the constructor.
You can then display that bitmap anyway you choose.