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 » 2018-02-16T13:54:47-07:00

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: 1447
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 » 2018-02-18T11:32:20-07:00

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