PhotoPage: show software used to edit photo

This commit is contained in:
Aaron van Geffen 2022-12-25 13:44:19 +01:00
parent d66f071aab
commit 2174e1d08b
2 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,7 @@ class EXIF
public $iso = 0;
public $shutter_speed = 0;
public $title = '';
public $software = '';
private function __construct(array $meta)
{
@ -35,6 +36,7 @@ class EXIF
'iso' => 0,
'shutter_speed' => 0,
'title' => '',
'software' => '',
];
if (!function_exists('exif_read_data'))
@ -101,6 +103,9 @@ class EXIF
elseif (!empty($exif['DateTimeDigitized']))
$meta['created_timestamp'] = self::toUnixTime($exif['DateTimeDigitized']);
if (!empty($exif['Software']))
$meta['software'] = $exif['Software'];
return new self($meta);
}

View File

@ -132,6 +132,11 @@ class PhotoPage extends SubTemplate
<dt>ISO Speed</dt>
<dd>', $this->exif->iso, '</dd>';
if (!empty($this->exif->software))
echo '
<dt>Software</dt>
<dd>', $this->exif->software, '</dd>';
echo '
</dl>
</div>';