Unfortunately this only solved my issue with not using all the available ram.

There seems to be a serious memory leak in the magick.net library.

As I wrote then I am running it in a multithread scenario and I have made a small component (managed dll) that encapsulates magick image (nquant and image processor libraries).
From my main application (which is where the threads are running) I am calling a function that encapsulate the code I pasted in the first post.

My problem is that the memory consumed by magick.net just keeps increasing and increasing. when it hit the maximum allowed memory then it starts filling the %temp% folder with image magick raw images. Some of these files are deleted but not all which means
that eventually this fills the entire hd or maximum allowed space.

Both the managed dll and the main application is specifically target for x64 CPU's/OS's. I have tried to explicitly call dispose on the MagickImage in the code from above, but with no change. I have also removed the Strip() function to see if that should have
any influence and it did not.

The reason why I am relatively certain that this issue is related to the magick.net library is that I tried to switch to the ImageProcessor library to do the same thing with the following code:

And with the ImageProcessor library there were no memory issues at all. The only difference from the main application is the method that is called in my managed dll. Unfortunately the ImageProcessor library does not give as good image quality as image magick
so I would prefer not to switch to it permanently.