forked from Public/pics
PhotoPage: show software used to edit photo
This commit is contained in:
parent
d66f071aab
commit
2174e1d08b
@ -12,6 +12,7 @@ class EXIF
|
|||||||
public $iso = 0;
|
public $iso = 0;
|
||||||
public $shutter_speed = 0;
|
public $shutter_speed = 0;
|
||||||
public $title = '';
|
public $title = '';
|
||||||
|
public $software = '';
|
||||||
|
|
||||||
private function __construct(array $meta)
|
private function __construct(array $meta)
|
||||||
{
|
{
|
||||||
@ -35,6 +36,7 @@ class EXIF
|
|||||||
'iso' => 0,
|
'iso' => 0,
|
||||||
'shutter_speed' => 0,
|
'shutter_speed' => 0,
|
||||||
'title' => '',
|
'title' => '',
|
||||||
|
'software' => '',
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!function_exists('exif_read_data'))
|
if (!function_exists('exif_read_data'))
|
||||||
@ -101,6 +103,9 @@ class EXIF
|
|||||||
elseif (!empty($exif['DateTimeDigitized']))
|
elseif (!empty($exif['DateTimeDigitized']))
|
||||||
$meta['created_timestamp'] = self::toUnixTime($exif['DateTimeDigitized']);
|
$meta['created_timestamp'] = self::toUnixTime($exif['DateTimeDigitized']);
|
||||||
|
|
||||||
|
if (!empty($exif['Software']))
|
||||||
|
$meta['software'] = $exif['Software'];
|
||||||
|
|
||||||
return new self($meta);
|
return new self($meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,6 +132,11 @@ class PhotoPage extends SubTemplate
|
|||||||
<dt>ISO Speed</dt>
|
<dt>ISO Speed</dt>
|
||||||
<dd>', $this->exif->iso, '</dd>';
|
<dd>', $this->exif->iso, '</dd>';
|
||||||
|
|
||||||
|
if (!empty($this->exif->software))
|
||||||
|
echo '
|
||||||
|
<dt>Software</dt>
|
||||||
|
<dd>', $this->exif->software, '</dd>';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
</dl>
|
</dl>
|
||||||
</div>';
|
</div>';
|
||||||
|
Loading…
Reference in New Issue
Block a user