public NUIImage(int width, int height)
{
uint imageSize = (uint)width * (uint)height * 4;
// create memory section and map
_section = CreateFileMapping(new IntPtr(-1), IntPtr.Zero, 0x04, 0, imageSize, null);
_map = MapViewOfFile(_section, 0xF001F, 0, 0, imageSize);
BitmapSource = Imaging.CreateBitmapSourceFromMemorySection(_section, width, height, PixelFormats.Bgr32, width * 4, 0) as InteropBitmap;
}