summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class4
1 files changed, 3 insertions, 1 deletions
diff --git a/it.class b/it.class
index fdc2fc0..f5a8978 100644
--- a/it.class
+++ b/it.class
@@ -499,6 +499,7 @@ function _exec_quotevalue($value)
* @param $p['size'] Width x height of resulting image, e.g. "160x60"
* @param $p['type'] Output file type, e.g. "jpg"
* @param $p['types'] Comma separated list of accepted input types, default "gif,jpg,png,bmp,tif,jp2,svg"
+ * @param $p['-opts'] Custom command line options to ImageMagick convert
* @return Success of convert as true/false
*/
function imageconvert($p)
@@ -519,9 +520,10 @@ function imageconvert($p)
}
$p += array('type' => $type, 'types' => "gif,jpg,png,bmp,tif,jp2,svg");
+ $p['-opts'] = array('-thumbnail' => $p['size']) + (array)$p['-opts'];
if (it::match(",$type,", ",{$p['types']},")) # Valid type?
- $result = it::exec("convert 2>&1 -flatten -quality 75 {-opts} {in} {type}:{out}", array('-opts' => array('-thumbnail' => $p['size'])), $p) === "";
+ $result = it::exec("convert 2>&1 -flatten -quality 75 {-opts} {in} {type}:{out}", $p) === "";
return $result;
}