Looking for ways to control (limit) resource usage in Magick.NET

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
Keith.Vinson
Posts: 22
Joined: 2017-08-30T12:59:12-07:00
Authentication code: 1151

Looking for ways to control (limit) resource usage in Magick.NET

Post by Keith.Vinson »

I am looking for the correct way to set the max memory and max pixel cache sizes preferably in code, but barring that should I use the policy.xml file by uncommenting the following lines and adjusting the values like this:

<policy domain="resource" name="memory" value="0MiB"/>
<policy domain="resource" name="map" value="0MiB"/>

I looked at the using something like this:
MagickReadSettings settings = new MagickReadSettings();
but I don't see the resource limits I'm looking to control.

Any help would be much appreciated, thanks...
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Looking for ways to control (limit) resource usage in Magick.NET

Post by dlemstra »

You can find an example on how to do that here: https://github.com/dlemstra/Magick.NET/ ... iles-class
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply