Quantcast
Viewing all articles
Browse latest Browse all 18858

RenderTargetBitmap MILERR_WIN32ERROR

Hello,

as others, I am hitting the 10,000 GDI objects limit with RenderTargetBitmap. But I haven't seen any solution other than "do not create that many bitmaps". So how can they be properly disposed?

I am creating tiny little bitmaps, tens of pixels max, but I need to create thousands of them. I create the RenderTargetBitmap, render a DrawingVisual on it, pass it to WriteableBitmap and read the pixel values out. The bitmap can be then disposed and next one processed, the number of them is not controlled by the application.

Reusing single bitmap could postpone the crash, but I am looking for a way to release them correctly. Any ideas?

Thanks,
Jan


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>