I have a Sharpdx Direct2D1 Bitmap from the render target. I want to save it to a file as an image though. This is for test purposes. I am not sure if i need a WIC bitmap for that or how to convert these bitmaps. Or how to receive the WIC bitmap in the first place.
Also i can't find an easy explanation how to save this bitmap to a file in general.
Any help appriciated.
Edit:
I'm using this approach now: http://www.rolandk.de/wp/2013/06/inhalt-der-rendertarget-textur-in-ein-bitmap-kopieren/
It is in German, but what he says is, that you have to copy the resource of the render target to a staging resource to have access via the cpu. Then copy the contents over to a bitmap.
I'm trying this approach then finally using bitmap.Save(filename). But somehow the bitmap stays empty. Maybe i miss to encode the file correctly. But seems more like I don't get the data from the back buffer target at all.