summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2015-10-12 19:01:57 +0200
committerUrban Müller2015-10-12 19:01:57 +0200
commit745b56e0aecaa952aff61c47824a190f452cda36 (patch)
treefddd677519cf109423464aeba1a3b72b329c4773 /it.class
parent044872a5afa7b7b2d3e758f32466bc331ac197ed (diff)
downloaditools-745b56e0aecaa952aff61c47824a190f452cda36.tar.gz
itools-745b56e0aecaa952aff61c47824a190f452cda36.tar.bz2
itools-745b56e0aecaa952aff61c47824a190f452cda36.zip
use pngcrush by default; smaller files, 10% performance hit
Diffstat (limited to 'it.class')
-rw-r--r--it.class3
1 files changed, 3 insertions, 0 deletions
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 === "";
}