static public function createFromFile($pathname)
    {
        if (!file_exists($pathname)) {
            throw new ImageFileNotFoundException($pathname);
        }
        $ii = getimagesize($pathname);
        $width = $ii[0];
        $height = $ii[1];
        $imagetype = $ii[2];
        $last_modified = filemtime($pathname);
        $exif = @exif_read_data($pathname);
        if (isset($exif['Orientation'])) {
            $orientation = $exif['Orientation'];
        } else {
            $orientation = 0;
        }
        return new static($pathname, $width, $height, $imagetype, $last_modified, $orientation);
    }
static public function createFromFile($pathname)
    {
        if (!file_exists($pathname)) {
            throw new ImageFileNotFoundException($pathname);
        }
        $ii = getimagesize($pathname);
        $width = $ii[0];
        $height = $ii[1];
        $imagetype = $ii[2];
        $last_modified = filemtime($pathname);
        $exif = @exif_read_data($pathname);
        if (isset($exif['Orientation'])) {
            $orientation = $exif['Orientation'];
        } else {
            $orientation = 0;
        }
        return new static($pathname, $width, $height, $imagetype, $last_modified, $orientation);
    }
static public function createFromFile ( $ pathname ) { if ( ! file_exists ( $ pathname ) ) { throw new ImageFileNotFoundException ( $ pathname ) ; } $ ii = getimagesize ( $ pathname ) ; $ width = $ ii [ 0 ] ; $ height = $ ii [ 1 ] ; $ imagetype = $ ii [ 2 ] ; $ last_modified = filemtime ( $ pathname ) ; $ exif = @ exif_read_data ( $ pathname ) ; if ( isset ( $ exif [ 'Orientation' ] ) ) { $ orientation = $ exif [ 'Orientation' ] ; } else { $ orientation = 0 ; } return new static ( $ pathname , $ width , $ height , $ imagetype , $ last_modified , $ orientation ) ; }
Create an ImageFileInfo from an image file

@param string $pathname The pathname of an image file.
@return ImageFileInfo
@throws ImageFileNotFoundException If the image does not exist
Create an ImageFileInfo from an image file