本文整理匯總了PHP中Driver::load方法的典型用法代碼示例。如果您正苦於以下問題:PHP Driver::load方法的具體用法?PHP Driver::load怎麽用?PHP Driver::load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Driver
的用法示例。
在下文中一共展示了Driver::load方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: load
public function load($filename, $return_data = false, $force_extension = false)
{
extract(parent::load($filename, $return_data, $force_extension));
if ($this->imagick == null) {
$this->imagick = new Fuel_Imagick();
}
$this->imagick->readImage($filename);
return $this;
}
示例2: load
public function load($filename, $return_data = false, $force_extension = false)
{
extract(parent::load($filename, $return_data, $force_extension));
$this->clear_sizes();
if (empty($this->image_temp)) {
do {
$this->image_temp = $this->config['temp_dir'] . substr($this->config['temp_applicationend'] . md5(time() * microtime()), 0, 32) . '.png';
} while (file_exists($this->image_temp));
} elseif (file_exists($this->image_temp)) {
$this->debug('Removing previous temporary image.');
unlink($this->image_temp);
}
$this->debug('Temp file: ' . $this->image_temp);
if (!file_exists($this->config['temp_dir']) || !is_dir($this->config['temp_dir'])) {
throw new RuntimeException("The temp directory that was given does not exist.");
} elseif (!touch($this->config['temp_dir'] . $this->config['temp_applicationend'] . '_touch')) {
throw new RuntimeException("Could not write in the temp directory.");
}
$this->exec('convert', '"' . $image_fullpath . '"[0] "' . $this->image_temp . '"');
return $this;
}