public function loadImage(string $file, string $path = '') : AbstractResize
    {
        if (file_exists($path . $file) === true) {
            $this->source['path'] = $path;
            $this->source['file'] = $file;
            $this->sourceProperties();
        } else {
            throw new \Exception("File couldn't be found in supplied destination: '" . $path . $file . "'");
        }

        // Reset the processed status when a new image is loaded
        $this->processed = false;
        $this->file = null;
        $this->path = null;

        return $this;
    }
public function loadImage(string $file, string $path = '') : AbstractResize
    {
        if (file_exists($path . $file) === true) {
            $this->source['path'] = $path;
            $this->source['file'] = $file;
            $this->sourceProperties();
        } else {
            throw new \Exception("File couldn't be found in supplied destination: '" . $path . $file . "'");
        }

        // Reset the processed status when a new image is loaded
        $this->processed = false;
        $this->file = null;
        $this->path = null;

        return $this;
    }
public function loadImage ( string $ file , string $ path = '' ) : AbstractResize { if ( file_exists ( $ path . $ file ) === true ) { $ this -> source [ 'path' ] = $ path ; $ this -> source [ 'file' ] = $ file ; $ this -> sourceProperties ( ) ; } else { throw new \ Exception ( "File couldn't be found in supplied destination: '" . $ path . $ file . "'" ) ; } // Reset the processed status when a new image is loaded $ this -> processed = false ; $ this -> file = null ; $ this -> path = null ; return $ this ; }
Load the image

@param string $file File name and extension
@param string $path Full patch to image

@return AbstractResize
@throws \Exception Throws an exception if the image can't be loaded
Load the image