WPF ImageViewer and UnmanagedBitmap

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
santonov
Posts: 1
Joined: Sat May 26, 2018 10:30 pm

WPF ImageViewer and UnmanagedBitmap

Post by santonov » Sat May 26, 2018 10:49 pm

Hi there,

I am considering to purchase license for Imaging .Net SDK, but there are some unclear moments. Could anyone explain how WpfImageViewer handles images converted from UnmanagedBitmap objects? In my case I am keeping images as raw byte arrays in database (together with metadata) and retrieving them into OpenCV objects, i.e. as unmanaged memory arrays accessed by IntPtr. I could convert those to UnmanagedBitmap (unfortunately it is not supported in demo version that I am using for evaluation), but then I have to convert it to VintasoftImage to add to image viewer. So question is -- is it internally converted to managed array? I have an issue with .Net Large Object Heap (LOH) fragmentation when I use managed memory allocation for my images and therefore I want to minimize use of LOH as much as possible.
.Net LOH allocates memory chunks larger than 85000 bytes and is never compacted or garbage collected, so over time application address space it getting fragmented and makes it impossible to allocate any more memory.

Thanks,
Sergei

Alex
Site Admin
Posts: 1578
Joined: Thu Jul 10, 2008 2:21 pm

Re: WPF ImageViewer and UnmanagedBitmap

Post by Alex » Mon May 28, 2018 3:54 pm

Hi Sergey,

The UnmanagedBitmap stores bitmap data in unmanaged memory, bitmap data are not converted to a managed array.

Best regards, Alexander

Post Reply