From 2174e1d08b2a805bd88a6c33bf83d173768bc120 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 25 Dec 2022 13:44:19 +0100 Subject: [PATCH] PhotoPage: show software used to edit photo --- models/EXIF.php | 5 +++++ templates/PhotoPage.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/models/EXIF.php b/models/EXIF.php index 1cb567b8..84108a56 100644 --- a/models/EXIF.php +++ b/models/EXIF.php @@ -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); } diff --git a/templates/PhotoPage.php b/templates/PhotoPage.php index 800c5218..3ce2b550 100644 --- a/templates/PhotoPage.php +++ b/templates/PhotoPage.php @@ -132,6 +132,11 @@ class PhotoPage extends SubTemplate
ISO Speed
', $this->exif->iso, '
'; + if (!empty($this->exif->software)) + echo ' +
Software
+
', $this->exif->software, '
'; + echo ' ';