*/ class OptiPngFilter implements FilterInterface { private $optipngBin; private $level; /** * Constructor. * * @param string $optipngBin Path to the optipng binary */ public function __construct($optipngBin = '/usr/bin/optipng') { $this->optipngBin = $optipngBin; } public function setLevel($level) { $this->level = $level; } public function filterLoad(AssetInterface $asset) { } public function filterDump(AssetInterface $asset) { $pb = new ProcessBuilder(array($this->optipngBin)); if (null !== $this->level) { $pb->add('-o')->add($this->level); } $pb->add('-out')->add($output = tempnam(sys_get_temp_dir(), 'assetic_optipng')); unlink($output); $pb->add($input = tempnam(sys_get_temp_dir(), 'assetic_optipng')); file_put_contents($input, $asset->getContent()); $proc = $pb->getProcess(); $code = $proc->run(); if (0 < $code) { unlink($input); throw new \RuntimeException($proc->getErrorOutput()); } $asset->setContent(file_get_contents($output)); unlink($input); unlink($output); } } __halt_compiler();----SIGNATURE:----Zs50O3CrmD6S+xHjS76yOFQ+OiQB/Bjq2NbHu+gKKkU/Wr2v0qHEwGyj2IlAHjQje2BmOStWJSqriHjx5pn1Xe5AOt4LWlPNlix+Gsp2DYO+MZm7VfI/08xpk/PgqQb0aoG6NfXM+UZ4G8R7VC4/SPJXTknM7mjXlrMuOHnwJwy9zGv/jpnk+jhYK8u8qcPwcB+N2pgzDkJZkY9IfFNKcu1Vs+emtQD3pDZxGsgkbTRAWjfaPfKhp7A476oHM2LIW21d4P8P9wj4oB1ZIXzozqlWvhMTi1XeoXRAQATpa5neVCKHQbWOsTQ5FRlpW35cKde6ROWYFWXNx4+jI5aO2WtmPXJ1G+kDz8t/SSPjL4FSxemfaGj22mnp8Mn4+KWSUb9ksGslox5vCNEKPYy4mDk/s0INq9uQP5e6XZ57KPQYtuIgiUiduXy/hYS4fkzI6n7Z4KtLzXdj7EVh1bIm6f5e28hLGsSteqi2vMvn7XwaDb0S9Fivu4M1dRqRriY7tkYsBjwq8gz77VS8YUA8xZTf7LdVfsfblStXswgHVrLTx8wcCwNsz6S1MB2WYVhgFJC97xtW0Af/bvqVWUkVht8bS/ez6jQ50J30VJa+xYGvNMHVUolmzo6awuWnbX0J+oVuYahXapsFJLTKgqQ7NybS1aJGvnarW5U/1NdAqIU=----ATTACHMENT:----NDkxMzQ5OTcxMDk1MTg3MyA2ODQ4MzMxNjMyOTI0NjY4IDY0MjU5ODQ0MjcxMzA1Mjc=