0
私はビットマップに慣れていないので、ビットマップとしてFrameworkElement
(specificaly Grid
)を保存してバッファにコピーする必要があります。問題は、RenderTargetBitmap
でサポートされていないPgrbaではなく、Rgba形式で保存する必要があることです。関連するコードは次のとおりです。RenderTargetBitmap with format rgba32
_targetBitmap = new RenderTargetBitmap(xres, yres, 96, 96, PixelFormats.Pbgra32);
_targetBitmap.Clear();
// Child is grid
_targetBitmap.Render(Child);
// copy the pixels into the buffer
_targetBitmap.CopyPixels(new Int32Rect(0, 0, xres, yres), bufferPtr, _bufferSize, _stride);
私はWriteableBitmapを使用しようとしましたが、子をレンダリングする方法はありませんでした。助言がありますか?
明らかに、WPFはRgba32をまったくサポートしていません。では、WriteableBitmapはどのように役立つはずですか? – Clemens
ああ、私はそう思った。私の悪い。 – Korhak