diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-08-23 15:54:46 +0200 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-08-23 15:54:46 +0200 |
commit | 092e7378cdaeefaa7b4a954bd865bba1960f01aa (patch) | |
tree | 43a01ef991aae0e394d6c0645f84cbc7b856f972 /include/photos.php | |
parent | e50e68719155c7d35e30bb203a403854f789d5a1 (diff) | |
parent | 2a59392ba8be974a5deec2e6f15959fde21186ea (diff) | |
download | volse-hubzilla-092e7378cdaeefaa7b4a954bd865bba1960f01aa.tar.gz volse-hubzilla-092e7378cdaeefaa7b4a954bd865bba1960f01aa.tar.bz2 volse-hubzilla-092e7378cdaeefaa7b4a954bd865bba1960f01aa.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/photos.php')
-rw-r--r-- | include/photos.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/photos.php b/include/photos.php index 7437d6aa9..cb7fabc98 100644 --- a/include/photos.php +++ b/include/photos.php @@ -166,7 +166,7 @@ function photo_upload($channel, $observer, $args) { return $ret; } - $exif = $ph->orient($src); + $exif = $ph->orient(($args['os_path']) ? $args['os_path'] : $src); @unlink($src); @@ -579,6 +579,16 @@ function getGps($exifCoord, $hemi) { return floatval($flip * ($degrees + ($minutes / 60) + ($seconds / 3600))); } +function getGpstimestamp($exifCoord) { + + $hours = count($exifCoord) > 0 ? gps2Num($exifCoord[0]) : 0; + $minutes = count($exifCoord) > 1 ? gps2Num($exifCoord[1]) : 0; + $seconds = count($exifCoord) > 2 ? gps2Num($exifCoord[2]) : 0; + + return sprintf('%02d:%02d:%02d',$hours,$minutes,$seconds); +} + + function gps2Num($coordPart) { $parts = explode('/', $coordPart); |