The application was crashed when i tried to create a bitmap source from bitmap handle by using the below code snippet,
IntPtr bitmapHandler = PdfiumViewer.FPDFBitmap_Create(Width, Height,0);
BitmapSource bs = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(bitmapHandler ,
IntPtr.Zero, Int32Rect.Empty,
System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
Exception details:
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationCore.dll
Additional information: Windows Codecs received an error from the Win32 system. (Exception from HRESULT: 0x88982F94)
Can any one please suggest how to get the bitmap source from bitmap handler which is created from FPDFBitmap_Create.
Regards,
KathiravanE