diff options
author | Urban Müller | 2015-10-12 19:49:09 +0200 |
---|---|---|
committer | Urban Müller | 2015-10-12 19:49:09 +0200 |
commit | 4e04d8fdf3befe81bd2a93190d5acb63059b131c (patch) | |
tree | 4a2b0a64c34af8e05a4c62dee73b4cc34c56ed1a /it.class | |
parent | 5fc9447678d6079107a9c6fdc588cbd1679b76e7 (diff) | |
download | itools-4e04d8fdf3befe81bd2a93190d5acb63059b131c.tar.gz itools-4e04d8fdf3befe81bd2a93190d5acb63059b131c.tar.bz2 itools-4e04d8fdf3befe81bd2a93190d5acb63059b131c.zip |
dont pngcrush by default; runtime is prohibitive after all
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 === ""; |