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
+1 -1
View File
@@ -370,7 +370,7 @@ UPDATE '.$tablename.'
{
$separator = $is_first ? '' : ",\n ";
if (isset($value) and $value != '')
if (isset($value) and $value !== '')
{
$query.= $separator.$key.' = \''.$value.'\'';
}
+12 -1
View File
@@ -55,7 +55,18 @@ final class SrcImage
if (!$this->size && isset($infos['width']) && isset($infos['height']))
{
$this->size = array($infos['width'], $infos['height']);
$width = $infos['width'];
$height = $infos['height'];
// 1 or 5 => 90 clockwise
// 3 or 7 => 270 clockwise
if ($infos['rotation'] % 2 != 0)
{
$width = $infos['height'];
$height = $infos['width'];
}
$this->size = array($width, $height);
}
}