mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
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:
@@ -370,7 +370,7 @@ UPDATE '.$tablename.'
|
||||
{
|
||||
$separator = $is_first ? '' : ",\n ";
|
||||
|
||||
if (isset($value) and $value != '')
|
||||
if (isset($value) and $value !== '')
|
||||
{
|
||||
$query.= $separator.$key.' = \''.$value.'\'';
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user