PixelFormat format = PixelFormats.Bgr32; // Bitmap source to write to. WriteableBitmap src = new WriteableBitmap((int)_kinectSensor.ColorStream.FrameWidth, (int)_kinectSensor.ColorStream.FrameHeight, 96, 96, format, null); // Stride for image. var stride = (int)_kinectSensor.ColorStream.FrameWidth * format.BitsPerPixel / 8; // Write pixels to bitmap source. src.WritePixels(new Int32Rect(0, 0, (int)imgPic.Width, (int)imgPic.Height), rawBayerPixels, stride, 0); // Set XAML image source = Bitmap source. imgPic.Source = src;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)