XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
convert.php
Go to the documentation of this file.
1 <?php
2 /*
3  +--------------------------------------------------------------------------------------------+
4  | DISCLAIMER - LEGAL NOTICE - |
5  +--------------------------------------------------------------------------------------------+
6  | |
7  | This program is free for non comercial use, see the license terms available at |
8  | http://www.francodacosta.com/licencing/ for more information |
9  | |
10  | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
11  | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
12  | |
13  | USE IT AT YOUR OWN RISK |
14  | |
15  | |
16  +--------------------------------------------------------------------------------------------+
17 
18 */
31 
32  function convert(phmagick $p){
33  $cmd = $p->getBinary('convert');
34  $cmd .= ' -quality ' . $p->getImageQuality();
35  $cmd .= ' "' . $p->getSource() .'" "'. $p->getDestination().'"';
36 
37  $p->execute($cmd);
38  $p->setSource($p->getDestination());
39  $p->setHistory($p->getDestination());
40  return $p ;
41  }
42 
43  function save(phmagick $p){
44  return $p->convert($p);
45  }
46 }
47 ?>