You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Imagemagick Call to undefined function exec() - exec is often disabled. #5383
We do use exec() in maybe 10 spots in the code, but mostly with a conditional to fall back to if it's not available. And it is often disabled. And the docs don't note it as a required php extension.
At the least, we don't want to throw php errors and it would be nice to have a fallback when it's not available.
Both integrations are in:
system/ee/legacy/libraries/Image_lib.php
image_process_imagemagick() begins around line 525 and calls exec() around line 569.
image_process_netpbm() begins around line 593 and calls exec() around line 654.
The class already uses the Imagick extension for strip_metadata(), but not for resizing, cropping, or rotation.
I'm not spotting an alternative for NetPBM, but Imagmagick could fall back to the extension.
HOWEVER research suggests that there are some differences in performance between the two options. So I'm not just dropping in a pr now adding it as a fallback.
The Imagick extension may produce slightly different output than the CLI. Testing should cover resize, crop, rotation, JPEG quality, PNG transparency, and GIF handling.
Existing CLI-configured installations should continue using the CLI backend. NetPBM behavior should remain unchanged when exec() is available.
Activity