本文整理汇总了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;
}