本文整理匯總了PHP中ImageHelper::resizeDown方法的典型用法代碼示例。如果您正苦於以下問題:PHP ImageHelper::resizeDown方法的具體用法?PHP ImageHelper::resizeDown怎麽用?PHP ImageHelper::resizeDown使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ImageHelper
的用法示例。
在下文中一共展示了ImageHelper::resizeDown方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: init
public function init()
{
parent::init();
$image = $this->params['content']->image;
$image['filename'] = ImageHelper::resizeDown($image['filename'], $this->params['content']->width, $this->params['content']->height);
$this->params['content']->image = $image;
}
示例2: init
public function init()
{
parent::init();
$keys = array_keys($this->params['content']->images);
$image = $this->params['content']->images[$keys[rand(0, count($keys) - 1)]];
$image['filename'] = ImageHelper::resizeDown($image['filename'], $this->params['content']->width, $this->params['content']->height);
$this->params['image'] = $image;
if (isset($image['data'][Yii::app()->language . '_caption'])) {
$this->params['caption'] = $image['data'][Yii::app()->language . '_caption'];
} else {
$this->params['caption'] = $this->params['widget']->title;
}
}