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.

This commit is contained in:
friendica 2015-03-16 20:08:05 -07:00
parent 841f94ce2a
commit 7c194c37b8
2 changed files with 12 additions and 3 deletions

View File

@ -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;
}

View File

@ -125,7 +125,9 @@ function photo_upload($channel, $observer, $args) {
return $ret;
}
$ph->orient($src);
$exif = $ph->orient($src);
@unlink($src);
$max_length = get_config('system','max_image_length');