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

Magick net parameters

Mar 6, 2014 at 12:40 PM

Quite new using

I've been deploying a service on a Windows Server 2003 with 4GB RAM and a limited free space in C: unit.

So far, I have overcome the lack of resources creating several environment variables (MAGICK_MEMORY_LIMIT, MAGICK_TEMPORARY_PATH and MAGICK_TMPDIR).

What I am wondering now is if instead of creating the environment variables, the configuration of those parameters can be done through the Initialize method and how. Because, I haven't found a good documentation on this issue.

Any help will be welcome.

Thanks in advance.
Mar 6, 2014 at 2:09 PM
You can set MAGICK_TEMPORARY_PATH/MAGICK_TMPDIR using MagickNET.SetTempDirectory. If you want to limit the resources that are being used you should use the properties in the recently created static class ResourceLimits.
Mar 6, 2014 at 4:39 PM
Edited Mar 7, 2014 at 1:00 PM
Thanks a lot, dlemstra!!

I am testing now, but I think you will have a beer bonus.
Mar 6, 2014 at 5:39 PM
Your welcome. But I have to disappoint you, my wishlist ( does not contain beer :P.
Nov 23, 2016 at 6:55 PM

I know this is an old thread, but my question is pretty relevant.
I'm trying to make all the processing to be in memory as much as possible so I don't have any of the magick-* files in my temp directly. From my understanding, ResourceLImits.Memory should allow me to change that. Is there a default value currently set for the memory limit? Also, would this limit be observed by the application as a whole? Or would each individual thread that reads in a file comply to that limit separately?
Nov 24, 2016 at 12:47 PM
The memory limit is unlimited by default. I am guessing that you are not running your application in a 64bit application pool. When you run your app inside a x86 application pool you will hit a memory limit much easier.

The limitation is for your whole application.