I am looking for the write to way setup limit memory from backend C# code.
I see that it possible via command line -limit memory 32MiB
but could I set up it via backend C#? The rest of settings I would like to leave as is by default.
Also I see that ImageMagick.Configuration.ConfigurationFiles but do not know is it what I need or not and how it could be used if yes.
Any help would be much appreciated.
Control (limit) resource usage in Magick.NET using C#
Re: Control (limit) resource usage in Magick.NET using C#
You are looking for the ResourceLimits class.
Re: Control (limit) resource usage in Magick.NET using C#
Thank you!
Is it enough just to set ResourceLimits.Memory=32...
or is it require more sophisticated initizlization?
Is it enough just to set ResourceLimits.Memory=32...
or is it require more sophisticated initizlization?
Re: Control (limit) resource usage in Magick.NET using C#
The value is in bytes so you should set it to `33554432` if you want to limit it to 32MiB