aboutsummaryrefslogtreecommitdiff
path: root/actions/resize.php
diff options
context:
space:
mode:
authorGreg Froese <greg.froese@gmail.com>2009-05-13 19:06:38 +0000
committerGreg Froese <greg.froese@gmail.com>2009-05-13 19:06:38 +0000
commit711c6040d3a5e3b479a1326c5afc6c3a689c8ad5 (patch)
tree88fb21fbcf59950994d97c58c40ddbfdcbd8d204 /actions/resize.php
parentbc21cbc465d9cd4d86265246826ba02515541152 (diff)
downloadelgg-711c6040d3a5e3b479a1326c5afc6c3a689c8ad5.tar.gz
elgg-711c6040d3a5e3b479a1326c5afc6c3a689c8ad5.tar.bz2
made path to imagemagick a setting
Diffstat (limited to 'actions/resize.php')
-rw-r--r--actions/resize.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/resize.php b/actions/resize.php
index 5dfc30975..1c3bf2bad 100644
--- a/actions/resize.php
+++ b/actions/resize.php
@@ -93,7 +93,12 @@
$newheight = $maxheight;
$newwidth = $maxwidth;
}
- $command = "convert $input_name -resize ".$newwidth."x".$newheight."^ -gravity center -extent ".$newwidth."x".$newheight." $output_name";
+ $im_path = get_plugin_setting('convert_command', 'tidypics');
+ if(!$im_path) {
+ $im_path = "/usr/bin/";
+ }
+ if(substr($im_path, strlen($im_path)-1, 1) != "/") $im_path .= "/";
+ $command = $im_path . "convert $input_name -resize ".$newwidth."x".$newheight."^ -gravity center -extent ".$newwidth."x".$newheight." $output_name";
system($command);
return $output_name;