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);
    }