C# XAML、Windows 8.1 で RenderTargetBitmap を BitmapImage に変換するにはどうすればよいですか?
私は試した
// rendered is the RenderTargetBitmap
BitmapImage img = new BitmapImage();
InMemoryRandomAccessStream randomAccessStream = new InMemoryRandomAccessStream();
await randomAccessStream.WriteAsync(await rendered.GetPixelsAsync());
randomAccessStream.Seek(0);
await img.SetSourceAsync(randomAccessStream);
しかし、常にエラーが発生します
img.SetSourceAsync(randomAccessStream);
WPF には多くの方法がありますが、WinRT では? どうやってやるの ?
どうもありがとう!