feature 2604: support rotation on derivatives

git-svn-id: http://piwigo.org/svn/trunk@13843 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2012-04-01 00:02:36 +00:00
parent 3a76852f0c
commit 2ec7183adb
6 changed files with 123 additions and 9 deletions

View file

@ -269,6 +269,11 @@ SELECT
}
}
// we need to save the rotation angle in the database to compute
// width/height of "multisizes"
$rotation_angle = pwg_image::get_rotation_angle($file_path);
$rotation = pwg_image::get_rotation_code_from_angle($rotation_angle);
$file_infos = pwg_image_infos($file_path);
if (isset($image_id))
@ -280,6 +285,7 @@ SELECT
'height' => $file_infos['height'],
'md5sum' => $md5sum,
'added_by' => $user['id'],
'rotation' => $rotation,
);
if (isset($level))
@ -307,6 +313,7 @@ SELECT
'height' => $file_infos['height'],
'md5sum' => $md5sum,
'added_by' => $user['id'],
'rotation' => $rotation,
);
if (isset($level))