public function loadFile($filename)
{
$cleanFilename = FS::clean($filename);
if (!FS::isFile($cleanFilename)) {
throw new Exception('Image file not forund: ' . $filename);
}
$this->cleanup();
$this->_filename = $cleanFilename;
$this->_loadMeta();
return $this;
}
public function testAutoOrient() { $excepted = Helper::getExpected(__FUNCTION__ . '.jpg'); $actual = Helper::getActual(__FUNCTION__ . '.jpg'); $original = Helper::getOrig('butterfly.jpg'); $img = new Image(); $img->loadFile($original)->autoOrient()->saveAs($actual); Helper::isFileEq($actual, $excepted); }