2
我無法理解如何使用FormatConvertedBitmap
將我從Pbgra32
轉換爲Bgr32
的WriteableBitmap
。我正在構建的應用程序最初使用Bgr32,並且我引入了WriteableBitmapEx
(使用Pbgra32)來翻轉圖像。現在,我需要將Pbgra32
轉換回Bgr32
以保持與程序其餘部分的一致性。以下是我所擁有的:使用FormatConvertedBitmap從Pbgra32轉換爲Bgr32 PixelFormats
FormatConvertedBitmap newFormat = new FormatConvertedBitmap(this.colorBitmap, PixelFormats.Bgr32, null, 0);
......我認爲這是正確的做轉換。但是,我不確定如何從中檢索WriteableBitmap。
你不能僅僅通過傳遞'newFormat' [本構造(HTTP創建一個新的WriteableBitmap的工作.microsoft.com/EN-US /庫/ aa346377.aspx)? – Clemens