if ('gif' == $this->info['type']) {
$this->gif = new Gif($file->getPathname());
$this->im = @imagecreatefromstring($this->gif->image());
} else {
$fun = "imagecreatefrom{$this->info['type']}";
$this->im = @$fun($file->getPathname());
}
if (empty($this->im)) {
throw new ImageException('Failed to create image resources!');
}
}
public static function open($file){
if (is_string($file)) {
$file = new \SplFileInfo($file);
}
if (!$file->isFile()) {