Php imagick has a high memory footprint. Can you optimize the memory footprint by setting GPU and so on?

when using the imagick plug-in to process PSD files, the speed is particularly slow and the memory footprint is relatively high. Slightly larger PSD files directly fill up memory.
for example, a 1-gigabyte PSD directly takes up 3-4 gigabytes of memory.
would like to ask if you have any optimization plan? If the computer supports GPU, can imagick use GPU for image processing?

Sep.28,2021

you can take a look at http://php.net/manual/en/imag.. This method
calls

like this.
// pixel cache max size
IMagick::setResourceLimit(imagick::RESOURCETYPE_MEMORY, 256);
// maximum amount of memory map to allocate for the pixel cache
IMagick::setResourceLimit(imagick::RESOURCETYPE_MAP, 256);

impossible programs run on PHP


$im- > clear ();
call the clear method to clean up imageick memory

Menu