From 745b56e0aecaa952aff61c47824a190f452cda36 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 12 Oct 2015 19:01:57 +0200 Subject: use pngcrush by default; smaller files, 10% performance hit --- it.class | 3 +++ 1 file changed, 3 insertions(+) (limited to 'it.class') diff --git a/it.class b/it.class index 8c16c56..2ab3c1d 100644 --- a/it.class +++ b/it.class @@ -693,6 +693,9 @@ 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") + it::exec('(pngcrush.sh 2>/dev/null {out} {out}.tmp && mv {out}.tmp {out}); rm -f {out}.tmp', $p); + return $cmdoutput === ""; } -- cgit v1.2.3