aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/include/functions_upload.inc.php7
-rw-r--r--include/config_default.inc.php4
2 files changed, 10 insertions, 1 deletions
diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php
index 1f1bc6686..ad25f848c 100644
--- a/admin/include/functions_upload.inc.php
+++ b/admin/include/functions_upload.inc.php
@@ -594,6 +594,13 @@ function pwg_image_resize_im($source_filepath, $destination_filepath, $max_width
function get_rotation_angle($source_filepath)
{
+ global $conf;
+
+ if (!$conf['upload_form_automatic_rotation'])
+ {
+ return null;
+ }
+
$rotation = null;
$exif = exif_read_data($source_filepath);
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index 02a595f86..b2cb57e98 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -761,5 +761,7 @@ $conf['enable_synchronization'] = true;
// PEM url
$conf['alternative_pem_url'] = '';
-
+// based on the EXIF "orientation" tag, should we rotate photos added in the
+// upload form or through pwg.images.addSimple web API method?
+$conf['upload_form_automatic_rotation'] = true;
?>