From 4e04d8fdf3befe81bd2a93190d5acb63059b131c Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 12 Oct 2015 19:49:09 +0200 Subject: dont pngcrush by default; runtime is prohibitive after all --- it.class | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 === ""; -- cgit v1.2.3