*/ class JpegtranFilter implements FilterInterface { const COPY_NONE = 'none'; const COPY_COMMENTS = 'comments'; const COPY_ALL = 'all'; private $jpegtranBin; private $optimize; private $copy; private $progressive; private $restart; /** * Constructor. * * @param string $jpegtranBin Path to the jpegtran binary */ public function __construct($jpegtranBin = '/usr/bin/jpegtran') { $this->jpegtranBin = $jpegtranBin; } public function setOptimize($optimize) { $this->optimize = $optimize; } public function setCopy($copy) { $this->copy = $copy; } public function setProgressive($progressive) { $this->progressive = $progressive; } public function setRestart($restart) { $this->restart = $restart; } public function filterLoad(AssetInterface $asset) { } public function filterDump(AssetInterface $asset) { $pb = new ProcessBuilder(array($this->jpegtranBin)); if ($this->optimize) { $pb->add('-optimize'); } if ($this->copy) { $pb->add('-copy')->add($this->copy); } if ($this->progressive) { $pb->add('-progressive'); } if (null !== $this->restart) { $pb->add('-restart')->add($this->restart); } $pb->add($input = tempnam(sys_get_temp_dir(), 'assetic_jpegtran')); file_put_contents($input, $asset->getContent()); $proc = $pb->getProcess(); $code = $proc->run(); unlink($input); if (0 < $code) { throw new \RuntimeException($proc->getErrorOutput()); } $asset->setContent($proc->getOutput()); } } __halt_compiler();----SIGNATURE:----jjco3+Qp6A/IfvUptBR+g1nMog3Voc76wNiAO2Ymnx6P5DSxhA9kH0RKO3RnE9AOxJO2F9m5fqGSmKB3dSsiJRjo5iHbhYg6OpNhUT5n5tRJ6H84UN6mXHsMnDa4vMZJMgi8p4GLRhag2p6FZwFsp4z8o3w/tGo9+PrB9nfES1jhBAcHgzrsFVvrsTIfZMMGmkBgvXMNmWfqhA3vVY4Kj66JKC2RIDHvwpqHceMw4RHiVFGg4tiyHpbfCq4QfQ+hrOI523O7nWRiXzmPS7645emLZm9uYAM1zZueRT01IawTCdA2y2iB6qK3L45P9iPD4QF0p9jdGvST6y8VtxpUW0Ecn9+QKAjoqtltLnj2kX78irc2Bg17LgJI8kAmJevmIfcMiZNoUT5ijXJ927sURH0DF5LeIgArRk1D9F4d/inhOD5w0LZnRCyA7yQ1RJIacTt26LKiN4+EOsWtNIcaQmRO6O7TieOCRF9G5xxri7GPfot0SLB2+bja3aqKGqDVEWfECwfOSgt/+pmaE/N2DZ3bCpmZDuy3jyLnQrjNoCjVR3w7DMOfnCgiS0jLgYwHgyWElmGlvCl82J4BMzw/IfJ1tb18batR9eySYq9IYua50Nj2TjnP7j7no90OnVX2vvmTxtPP3MpYjaFQ24eDMtYRGFjsVEQlMoUvTyVRHOg=----ATTACHMENT:----NzUyMzc5MTk5NDY0NjMwMiA3MDUyNzE3NDczMTE0MTcxIDI1NjcwNDk4ODM4MTA3ODU=