public function resizeImage($fieldName, $path) { $ImageHelper = new ImageHelper(); $ImageHelper->folder = $path; $ImageHelper->file = $this->{$fieldName}; $ImageHelper->thumbs = $this->aImageSize[$fieldName]; $ImageHelper->createThumbs(); }
/** * @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(); }