src/Image/Inline.php
public function setImageFromFile($file)
    {
        if (preg_match('/\.([^\.]+)$/', $file, $match) === 1) {
            $this->setMimeType('image/' . $match[1]);
        }
        return $this->setImageFromBlob(file_get_contents($file));
    }
public function setImageFromFile($file)
    {
        if (preg_match('/\.([^\.]+)$/', $file, $match) === 1) {
            $this->setMimeType('image/' . $match[1]);
        }
        return $this->setImageFromBlob(file_get_contents($file));
    }
public function setImageFromFile ( $ file ) { if ( preg_match ( '/\.([^\.]+)$/' , $ file , $ match ) === 1 ) { $ this -> setMimeType ( 'image/' . $ match [ 1 ] ) ; } return $ this -> setImageFromBlob ( file_get_contents ( $ file ) ) ; }
Set the image source from a file.

@param string $file The image file.

@return \Ork\Image\Inline Allow method chaining.
Set the image source from a file .