public static function optimizePngout($path)
{
$bin = \Pimcore\Tool\Console::getExecutable("pngout", false);
if ($bin) {
$newFile = self::getTempFile("png");
Console::exec($bin . " " . escapeshellarg($path) . " " . $newFile, null, 60);
if (file_exists($newFile)) {
return $newFile;
}
}
return null;
}