Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
The memory/map limits only affect the image pixel cache. Other algorithms consume as much memory as required. We suspect the problem is that JPEG-compressed PDFs are generated as memory blobs. We can reduce memory consumption by performing the compression on disk. We'll get a patch into the next release of ImageMagick.
Is there any other chance to limit the memory usage of ImageMagick?
The problem is that conversions with huge images may lead to a crash of the system, because of a too high memory consumption.
Will your change also affect other programs like "compare"? That would be great.
No user program requesting memory should crash a system. That would be a bug in the operating system. For some algorithms, ImageMagick memory requirements are proportional to the area of the image. The only way around that is to identify which algorithm is consuming memory and avoid it or use some other program.
magick wrote:
The memory/map limits only affect the image pixel cache. Other algorithms consume as much memory as required. We suspect the problem is that JPEG-compressed PDFs are generated as memory blobs. We can reduce memory consumption by performing the compression on disk. We'll get a patch into the next release of ImageMagick.
Hi again,
has the patch already already been included into the most recent release of ImageMagick?
Its possible something other than JPEG is consuming memory. Embedded JPEG within PDF is written to disk in ImageMagick 6.3.1 rather than a memory blob (see JPEGEncodeImage()). You also need to set the memory limit to something small to turn off JPEG optimization which is memory intensive (e.g. -limit memory 1).