The architecture of Magick.NET is different from the .NET Bitmap, and this cannot be changed.
You could limit the memory with the ResourceLimits class but that will create a new file on disk that contains the pixel data. This will really slow down your application but it will limit the use of memory.
A better solution would be reading a single frame from disk with the MagickReadSettings class:
This will be slower than reading the whole image at once but it will reduce the amount of memory being used.
You could limit the memory with the ResourceLimits class but that will create a new file on disk that contains the pixel data. This will really slow down your application but it will limit the use of memory.
A better solution would be reading a single frame from disk with the MagickReadSettings class:
MagickReadSettings settings = new MagickReadSettings() { FrameIndex = 0, // Change this number to set the start index of the pages. FrameCount = 1 // Change this number to set the number of pages. }; using (MagickImage image = new MagickImage("your.tif", settings)) { image.Write("your.firstpage.tif"); }