2

How do I get a RenderTargetBitmap object into a SoftwareBitmap? It is possible to get a RenderTargetBitmap as Image Source and on the other side i can use a SoftwareBitmap as a SoftwareBitmapSource and turn that into an ImageSource. But how can I convert RenderTargetBitmap directly to SoftwareBitmap?

1 Answer 1

7

RenderTargetBitmap.GetPixelsAsync returns an IBuffer which you can copy into a SoftwareBitmap with SoftwareBitmap.CreateCopyFromBuffer

Sign up to request clarification or add additional context in comments.

1 Comment

How can I covert it to a CanvasBitmap later? I am using CanvasBitmap.CreateFromSoftwareBitmap but i get System.Exception: The bitmap pixel format is unsupported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.