Search code examples
wpfwinformssystem.drawing

Image.FromHbitmap WPF equivalent


Is there a System.Drawing.Image.FromHbitmap equivalent in WPF? Also, is it possible to dispose the handle properly after creating an image?

Thank you.


Solution

  • Take a look at Imaging.CreateBitmapSourceFromHBitmap in the System.Windows.Interop namespace.