私がやりたいことは
this.colorBitmap = new WriteableBitmap(350, 600, dpiX, dpiY, PixelFormats.Bgr32, null);
this.image1.Source = this.colorBitmap;
私はマイクロソフトのキネクトプログラムを作っています。サイズが350x640のカラーフレームを表示したい。ただし、ColorImageFormat の選択肢は 640x480 と 1280x960 のみです。
(ご存知のとおり、InfraredResolution640x480Fps30 または RawBayerResolution1280x960Fps12 など..)
以下を試すと、ストリームは非常に奇妙に見えます。ノイズだらけ
nui.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
this.colorPixels = new byte[nui.ColorStream.FramePixelDataLength];
this.colorBitmap = new WriteableBitmap(350, 600, 96.0, 96.0, PixelFormats.Bgr32, null);
this.image1.Source = this.colorBitmap;