Skip to content

Commit

Permalink
feature 2040: to finish the "automatic rotation" feature, I had confi…
Browse files Browse the repository at this point in the history
…guration

setting. I choose to have it in the configuration file and not in the web
interface because it is a bit too technical and useful only in very specific
cases (when buggy software performed a rotation before without updating the
EXIF "orientation" tag)


git-svn-id: http://piwigo.org/svn/trunk@8763 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Jan 19, 2011
1 parent 1b7781c commit 714219f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions admin/include/functions_upload.inc.php
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion include/config_default.inc.php
Expand Up @@ -761,5 +761,7 @@
// 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;
?>

0 comments on commit 714219f

Please sign in to comment.