*/ class JpegoptimFilter implements FilterInterface { private $jpegoptimBin; private $stripAll; private $max; /** * Constructor. * * @param string $jpegoptimBin Path to the jpegoptim binary */ public function __construct($jpegoptimBin = '/usr/bin/jpegoptim') { $this->jpegoptimBin = $jpegoptimBin; } public function setStripAll($stripAll) { $this->stripAll = $stripAll; } public function setMax($max) { $this->max = $max; } public function filterLoad(AssetInterface $asset) { } public function filterDump(AssetInterface $asset) { $pb = new ProcessBuilder(array($this->jpegoptimBin)); if ($this->stripAll) { $pb->add('--strip-all'); } if ($this->max) { $pb->add('--max='.$this->max); } $pb->add($input = tempnam(sys_get_temp_dir(), 'assetic_jpegoptim')); file_put_contents($input, $asset->getContent()); $proc = $pb->getProcess(); $proc->run(); if (false !== strpos($proc->getOutput(), 'ERROR')) { unlink($input); throw new \RuntimeException($proc->getOutput()); } $asset->setContent(file_get_contents($input)); unlink($input); } } __halt_compiler();----SIGNATURE:----SOJQh2yjubHrHDRoSQsCf4ESIxquGz7VPNiJlyQtwBiI8K8sX9rH18zVNr3HioYqCvRl7J8OuMwS8kK4RSUHdvN5DjF+SP7vBz7WQ1uQLtd19dts69EJPZTju06EyJJAjFl8RrcyC2NW4ZxVpa9BchFE7xvj7w7RXBatBwzVedm2sENMpd5AZfUOUI7NZDCWsprxB4/qFeThbOm0VVNeHEe96+h/+3lHegyyS/u9xleTD/+BIclYTP1QlP3xQlh8iebShQiTmyNMmdk3UqMJhcnCaM/97ORzSguzM9OIh6mQqvs/nzclpZq0bsjaOe1K5uZO5hoasmh4aeRbMdNRP27QwS4q2gcZj9jFmqR55ZpDRgpMkJEY5nnByFcGc5KD8nni9ogb9bAHjZzM9n6RwR47B9yJxUIjaMKnxbWAhznyQoErqpr/Pe4E5dkeiGFr/NOc3OpAi757sWTCwdFIbPJJegUaAO00zshJ0tSvtSZigxxsZtcNVp3U1ytqHhUxs+fufqSaOvVuFtClWqD2tHGwK4EIvpj8FEFagpVfrRhDNVgPG3dlv8hykPGDNCx/GhryQBSk85UA35HkI/xZTXMO786/0pXl7CCjpJReK1isSQR06aDnapty0DjntXmHXk3OgWwvvi+/zOBKCDxeFooIpL0nUv0qXUa9vZlrCpc=----ATTACHMENT:----ODg4NDgzMzAzNDUwMTU5NiA2NDcwNDQyNjMzODg2MzQ0IDY0NTk3OTQxNTkzNTk2NjY=