Reputation: 115
Is it possible to use WPF's InteropBitmap together with gdi+ ? Any examples ?
(I need it for 2D drawing, many small objects; I know how to use gdi+ with WriteableBitmap => (see post by Danko) , but after all I've read InteropBitmap should be faster)
fritz
Upvotes: 2
Views: 1052
Reputation: 3725
I'd avoid using InteropBitmap for the time being and with this kind of task. I don't think the performance increase would be all you're hoping it to be, especially with the memory leak that requires you constantly calling GC.Collect(). If you said you were doing Direct2D instead of GDI+, I would see more of a reason to attempt going this route.
Is the GDI+ 2D drawing you need to do something that can't be ported over to DrawingContext's methods? In my experience, this has been the easiest and fastest route to porting GDI+ stuf to WPF.
Upvotes: 1