aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/photo/photo_driver.php4
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