Exemplo n.º 1
0
 public function createResizedImage($height, $width, $inFileName, $outFileName)
 {
     $image = new Image($inFileName);
     $res = $image->scaleResize($height, $width)->save($outFileName);
     return $res;
 }
Exemplo n.º 2
0
 /**
  * @param $filePath /home/user/var/www/site/upload/img.png
  * @param $width
  * @param $height
  * @return mixed
  */
 public function scaleResize($filePath, $width, $height)
 {
     $image = new Image($filePath);
     return $image->scaleResize($width, $height, 0xffffff);
 }