예제 #1
0
 public function resizeImage($fieldName, $path)
 {
     $ImageHelper = new ImageHelper();
     $ImageHelper->folder = $path;
     $ImageHelper->file = $this->{$fieldName};
     $ImageHelper->thumbs = $this->aImageSize[$fieldName];
     $ImageHelper->createThumbs();
 }
예제 #2
0
 /**
  * @Author: ANH DUNG Jul 25, 2014
  * @Todo: resize photo
  * @Param: $model, $fieldName, $aSize
  */
 public static function resizeImage($model, $fieldName, $aSize)
 {
     $ImageHelper = new ImageHelper();
     $ImageHelper->folder = '/' . self::$folderUpload;
     $ImageHelper->file = $model->{$fieldName};
     $ImageHelper->aRGB = array(0, 0, 0);
     //full black background
     $ImageHelper->thumbs = $aSize;
     //        $ImageHelper->createFullImage = true;
     $ImageHelper->createThumbs();
 }