0
我想捕捉我的WPF Viewport3D,問題是無論我做什麼都沒有捕捉到高質量,RenderTargetBitmap的最佳質量應該是什麼參數?高質量捕捉3D模型
RenderTargetBitmap bmp = new RenderTargetBitmap(
(int)viewport3D.ActualWidth, (int)viewport3D.ActualHeight, 96, 96, PixelFormats.Pbgra32);
bmp.Render(viewport3D);
PngBitmapEncoder png = new PngBitmapEncoder();
png.Frames.Add(BitmapFrame.Create(bmp));
using (Stream stm = File.Create(m_captureWithoutMainModelFileName))
{
png.Save(stm);
}
我試圖將圖像保存爲BMP,但它並沒有提高質量。
謝謝,我試過了,結果是一個白色的圖像沒有任何東西。 – Erez 2012-07-16 12:21:02
ooops。忘了乘以96: - /用debbuger檢查值。 – GameAlchemist 2012-07-16 12:29:42
現在有一個圖像,但質量是剛開始相同 – Erez 2012-07-16 13:36:28