aboutsummaryrefslogtreecommitdiff
path: root/actions/resize.php
diff options
context:
space:
mode:
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;