Fix exif rotation (not orientation) 🙄

old-stable24
Varun Patil 2022-10-17 19:45:44 -07:00
parent 3c8e1f083d
commit 3b56446305
1 changed files with 3 additions and 2 deletions

View File

@ -323,8 +323,9 @@ class Exif {
$height = $exif['ImageHeight'] ?? 0;
// Check if image is rotated and we need to swap width and height
$rotation = $exif['Orientation'] ?? 0;
if (in_array($rotation, [5, 6, 7, 8])) {
$rotation = $exif['Rotation'] ?? 0;
$orientation = $exif['Orientation'] ?? 0;
if (in_array($orientation, [5, 6, 7, 8]) || in_array($rotation, [90, 270])) {
return [$height, $width];
}