1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-10-22 19:36:39 +02:00

adding support for pngquant

This commit is contained in:
Mikael Roos
2016-08-09 13:01:38 +02:00
parent 9f6cba9292
commit 7ab19d39d6
9 changed files with 116 additions and 8 deletions

View File

@@ -163,3 +163,24 @@ function verbose($msg = null)
$log[] = $msg;
}
/**
* Log when verbose mode, when used without argument it returns the result.
*
* @param string $msg to log.
*
* @return void or array.
*/
function checkExternalCommand($what, $enabled, $commandString)
{
$no = $enabled ? null : 'NOT';
$text = "Post processing $what is $no enabled.<br>";
list($command) = explode(" ", $commandString);
$no = is_executable($command) ? null : 'NOT';
$text .= "The command for $what is $no an executable.<br>";
return $text;
}