diff options
Diffstat (limited to 'include/derivative.inc.php')
-rw-r--r-- | include/derivative.inc.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/derivative.inc.php b/include/derivative.inc.php index 144e76a27..ca840a4d9 100644 --- a/include/derivative.inc.php +++ b/include/derivative.inc.php @@ -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); } } |