如何在 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中?我怎样才能做到这一点 ?
非常感谢!