From 7c194c37b891f122740de52d154db0af612e0074 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 16 Mar 2015 20:08:05 -0700 Subject: started to add the ability to geotag photos (default will be disabled) but my phone isn't outputting the GPS tags even after being explicitly enabled so I'll have to wait until I've got a device that I can reliably test against. --- include/photo/photo_driver.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include/photo') diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index e63125671..6f508bf72 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -241,9 +241,9 @@ abstract class photo_driver { if((! function_exists('exif_read_data')) || ($this->getType() !== 'image/jpeg')) return; - $exif = @exif_read_data($filename); + $exif = @exif_read_data($filename,null,true); if($exif) { - $ort = $exif['Orientation']; + $ort = $exif['IFD0']['Orientation']; switch($ort) { @@ -280,7 +280,14 @@ abstract class photo_driver { $this->rotate(90); break; } + + // logger('exif: ' . print_r($exif,true)); + return $exif; + } + + return false; + } -- cgit v1.2.3