yii2 扩展
示例
安装扩展
composer require --prefer-dist yiisoft/yii2-imagine
使用扩展
use yii\imagine\Image;
public function actionIndex()
{
Image::thumbnail('@webroot/img/test.jpg', 120, 120)
->save(Yii::getAlias('@runtime/thumb-test.jpg'), ['quality' => 50]);
return $this->render('index');
}
```
标签:扩展,jpg,120,imagine,test,yii2
From: https://www.cnblogs.com/hu308830232/p/18105450