Class ResourceLimits
- Namespace
- ImageMagick
- Assembly
- Magick.NET-Q16-AnyCPU.dll
Class that can be used to set the limits to the resources that are being used.
public class ResourceLimits : IResourceLimits
- Inheritance
-
ResourceLimits
- Implements
-
IResourceLimits
- Inherited Members
Constructors
ResourceLimits()
public ResourceLimits()
Properties
Area
Gets or sets the maximum width * height of an image that can reside in the pixel cache memory. Images that exceed the area limit are cached to disk.
public static ulong Area { get; set; }
Property Value
Disk
Gets or sets the pixel cache limit in bytes. Requests for memory above this limit will fail.
public static ulong Disk { get; set; }
Property Value
Height
Gets or sets the maximum height of an image.
public static ulong Height { get; set; }
Property Value
ListLength
Gets or sets the maximum number of images in an image list.
public static ulong ListLength { get; set; }
Property Value
MaxMemoryRequest
Gets or sets the max memory request in bytes. ImageMagick maintains a separate memory pool for large resource requests. If the limit is exceeded when allocating pixels, the allocation is instead memory-mapped on disk.
public static ulong MaxMemoryRequest { get; set; }
Property Value
MaxProfileSize
Gets or sets the max size of a profile in bytes that can be added to the image.
public static ulong MaxProfileSize { get; set; }
Property Value
Memory
Gets or sets the pixel cache limit in bytes. Once this memory limit is exceeded, all subsequent pixels cache operations are to/from disk. The default value of this is 50% of the available memory on the machine in 64-bit mode. When running in 32-bit mode this is 50% of the limit of the operating system.
public static ulong Memory { get; set; }
Property Value
Thread
Gets or sets the number of threads used in multithreaded operations.
public static ulong Thread { get; set; }
Property Value
Throttle
Gets or sets the time specified in milliseconds to periodically yield the CPU for.
public static ulong Throttle { get; set; }
Property Value
Time
Gets or sets the maximum number of seconds that the process is permitted to execute. Exceed this limit and an exception is thrown and processing stops.
public static ulong Time { get; set; }
Property Value
Width
Gets or sets the maximum width of an image.
public static ulong Width { get; set; }
Property Value
Methods
LimitMemory(Percentage)
Set the maximum percentage of memory that can be used for image data. This also changes the Area limit to four times the number of bytes.
public static void LimitMemory(Percentage percentage)
Parameters
percentage
PercentageThe percentage to use.