C#RenderTargetBitmap到SoftwareBitmap

mjw*_*mjw 1 c# uwp

如何将RenderTargetBitmap对象转换为SoftwareBitmap?可以将RenderTargetBitmap作为Image Source获取,另一方面我可以将SoftwareBitmap用作SoftwareBitmapSource并将其转换为ImageSource.但是如何将RenderTargetBitmap直接转换为SoftwareBitmap?

Rob*_*SFT 6

RenderTargetBitmap.GetPixelsAsync返回一个IBuffer,您可以使用SoftwareBitmap将其复制到SoftwareBitmap中.CreateCopyFromBuffer