diff options
author | Urban Müller | 2015-10-12 19:01:57 +0200 |
---|---|---|
committer | Urban Müller | 2015-10-12 19:01:57 +0200 |
commit | 745b56e0aecaa952aff61c47824a190f452cda36 (patch) | |
tree | fddd677519cf109423464aeba1a3b72b329c4773 | |
parent | 044872a5afa7b7b2d3e758f32466bc331ac197ed (diff) | |
download | itools-745b56e0aecaa952aff61c47824a190f452cda36.tar.gz itools-745b56e0aecaa952aff61c47824a190f452cda36.tar.bz2 itools-745b56e0aecaa952aff61c47824a190f452cda36.zip |
use pngcrush by default; smaller files, 10% performance hit
-rw-r--r-- | it.class | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 === ""; } |