mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-28 20:29:58 +03: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:
parent
3a76852f0c
commit
2ec7183adb
6 changed files with 123 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue