summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2015-10-12 19:49:09 +0200
committerUrban Müller2015-10-12 19:49:09 +0200
commit4e04d8fdf3befe81bd2a93190d5acb63059b131c (patch)
tree4a2b0a64c34af8e05a4c62dee73b4cc34c56ed1a
parent5fc9447678d6079107a9c6fdc588cbd1679b76e7 (diff)
downloaditools-4e04d8fdf3befe81bd2a93190d5acb63059b131c.tar.gz
itools-4e04d8fdf3befe81bd2a93190d5acb63059b131c.tar.bz2
itools-4e04d8fdf3befe81bd2a93190d5acb63059b131c.zip
dont pngcrush by default; runtime is prohibitive after all
-rw-r--r--it.class3
1 files changed, 2 insertions, 1 deletions
diff --git a/it.class b/it.class
index f6a1713..9f9749e 100644
--- a/it.class
+++ b/it.class
@@ -652,6 +652,7 @@ static function cdist(/* $file1, ... */)
* @param $p['types'] Comma separated list of accepted input types, default "bmp,eps,gif,jp2,jpg,png,svg,tif"
* @param $p['quality'] JPEG quality (0-100), default is 75
* @param $p['keepalpha'] Don't add option --flatten to preserve alpha channel
+ * @param $p['pngcrush'] Use pngcrush for sm
* @param $p['-opts'] Custom command line options to ImageMagick convert
* @return Success of convert as true/false
*/
@@ -693,7 +694,7 @@ static function imageconvert($p)
if (in_array($type, explode(',', $p['types']))) # Valid type?
$cmdoutput = it::exec('( ' . $ultratimeout . 'gm convert 2>&1 {-opts} {in} {type}:{out} || echo "SHELL ERROR $?" ) | grep -v " iCCP: "', $p);
- if ($p['type'] == "png")
+ if ($p['pngcrush'] && $p['type'] == "png")
it::exec('pngcrush.sh 2>/dev/null {out} {out}.tmp && mv {out}.tmp {out} || rm {out}.tmp', $p);
return $cmdoutput === "";