diff options
author | Mario <mario@mariovavti.com> | 2020-12-29 11:49:11 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-12-29 11:49:11 +0100 |
commit | c84e3334bfb18fb90945a17d27b43bcb57ef4a1b (patch) | |
tree | 2ec86e2505c6b71f3b66d7983fa0188628e4a8f6 | |
parent | d5eeb948d51ac6619f89045984698d8d55bbb3f2 (diff) | |
parent | 36d89d02e13ed856de6bace89bfbed05205005db (diff) | |
download | volse-hubzilla-c84e3334bfb18fb90945a17d27b43bcb57ef4a1b.tar.gz volse-hubzilla-c84e3334bfb18fb90945a17d27b43bcb57ef4a1b.tar.bz2 volse-hubzilla-c84e3334bfb18fb90945a17d27b43bcb57ef4a1b.zip |
Merge branch 'tuneimagick' into 'dev'
Implement Imagemagick resources consumption limiting
See merge request hubzilla/core!1888
-rw-r--r-- | include/photo/photo_driver.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 52f761b65..f61919eea 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -38,6 +38,10 @@ function photo_factory($data, $type = null) { $v = Imagick::getVersion(); preg_match('/ImageMagick ([0-9]+\.[0-9]+\.[0-9]+)/', $v['versionString'], $m); if(version_compare($m[1], '6.6.7') >= 0) { + $limits = get_config('system', 'imagick_limits', false); + if ($limits) + foreach ($limits as $k => $v) + IMagick::setResourceLimit($k, $v); $ph = new PhotoImagick($data, $type); } else { // earlier imagick versions have issues with scaling png's |