Bitmap(int, int, int, PixelFormat, IntPtr) equivalent on CF?
Basically, I wish to reproduce this mechanism on CF:
m_PixelBuffer = new int[320 * 240];
m_Handle = GCHandle.Alloc(m_PixelBuffer, GCHandleType.Pinned);
m_Pointer = Marshal.UnsafeAddrOfPinnedArrayElement(m_PixelBuffer, 0);
m_PixelBufferAsBitmap = new Bitmap(320, 240, 320 * 4,
System.Drawing.Imaging.PixelFormat.Format32bppPArgb, m_Pointer);
So far, I have made this change (CF2.0):
m_Pointer = m_Handle.AddrOfPinnedObject();
but how do I construct a bitmap with reference to the excact address,
m_Pointer?
Thanks for your time
Date:Fri, 10 Aug 2007 00:52:44 -0700
Author:
|