imagemagick - Limit number of threads in IMagick (PHP) -


When using ImageMagick, I can set a fixed limit for memory usage and maximum number of threads. To do this, I know as far as 3 ways:

  1. Use an order "-limit memory 128MB original.jpg new.jpg Convert" Line options like "
  2. < Li> Use the "MAGICK_THREAD_LIMIT = 1" environment variables
  3. To change the default value of the 'policy.xml' configuration file.

I have tested each of these methods using the "convert-list resource" and they work.

Now, I have to use the IMagick extension in PHP. There is a function I can use to set the range:

  bool Imagick :: setResourceLimit (integer $ type, integer $ range)  

The first parameter I can use one of the following:

  Imagick :: RESOURCETYPE_AREA (integer) // MAGICK_AREA_LIMIT Imagick :: RESOURCETYPE_DISK (integer) // MAGICK_DISK_LIMIT Imagick equal to: RESOURCETYPE_FILE ( Integer) equal to / / MAGICK_FILE_LIMIT imagery: RESOURCETYPE_MAP (integer) // MAGICK_MAP_LIMIT equivalent to imagery: RESOURCETYPE_MEMORY (integer) // MAGICK_MEMORY_LIMIT Equal  

The problem is that is not equal to MAGICK_THREAD_LIMIT and Aimajik ignore only configuration files and environment variables How do I know about it? I have set all the memory limit to zero and any problem still works without any problem, Ignic.

I really hope that I have made myself clear the question is: How can I change thread borders using Imagick

Edit: I '--without With ImageMagick compilations, you have managed to set the threshold limit to 1. : P until I have to find a better solution

this help:.

  Imagick :: setResourceLimit (6, 1);  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -