aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/photo/photo_driver.php11
-rw-r--r--include/photos.php4
2 files changed, 12 insertions, 3 deletions
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;
+
}
diff --git a/include/photos.php b/include/photos.php
index c2f5ed4ba..4b7809fc1 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -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');