This project has moved and is read-only. For the latest updates, please go here.

How can I set memory option defaultly?

Jun 18, 2014 at 4:54 AM
Edited Jun 18, 2014 at 5:07 AM
Hi, Magick.NET is a very useful project. I am beginning to test some cases now. So I have a question to ask. Hope someone can make tips here.

When I run convert command to process image file, it only consume memory, and this is my preferred. But if I referenced Magick.NET.dll into my c# project, it would generate some huge temporary file in disk to swap. It seemed the memory option is ignored, and the execution is very slow.

Usually I need to process jpg file about 150M, the memory will be consumed about 4.5G. The server has enough memory to handle with the process task, but how can I set some configuration to use server memory rather than disk swap? Thanks.
Jun 18, 2014 at 6:07 AM
Which version of Magick.NET are you using? What 'memory option' is ignored? What are the dimensions (width x height) of your 150 MB JPEG file?
Jun 18, 2014 at 6:24 AM
Edited Jun 18, 2014 at 6:25 AM
Hi, Thanks your reply.

I just downloaded the source code from codeplex and compiled it two days ago, I think the version is the newest Magick.NET 6.8.9.101. The referenced dll is Magick.NET-x86.dll. In my question, I really want to the program to use memory directly, I hope there are some enable/disable options I can choose. I checked one of the large imagea, the dimensions is 24000x24000, the file size is 134M.
Jun 18, 2014 at 7:52 AM
I think you should switch to the x64 version of Magick.NET if you want to allocate that much memory. If you use the Q16 build you need 4GB memory, but under windows in a 32bit process you can only allocate 2GB.

Also don't forget to build with the new source or use the new binary when I have published a new release. The current build contains a memory leak.
Jun 21, 2014 at 9:56 AM
Hi, thanks. It really works when I change to x64 version component. I will wait for your next version.:-)
Jun 21, 2014 at 12:42 PM
I published Magick.NET 6.8.9.401 yesterday, you can find it here: https://magick.codeplex.com/releases