From: Varun Patil Date: Thu, 8 Dec 2022 23:06:58 +0000 (-0800) Subject: preview: fix HEIC orientation X-Git-Tag: v24.0.9rc1~45^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F35729%2Fhead;p=nextcloud-server.git preview: fix HEIC orientation Signed-off-by: Varun Patil --- diff --git a/lib/private/Preview/HEIC.php b/lib/private/Preview/HEIC.php index 7ce6b93ba3b..d29e0d29daf 100644 --- a/lib/private/Preview/HEIC.php +++ b/lib/private/Preview/HEIC.php @@ -115,6 +115,9 @@ class HEIC extends ProviderV2 { // Layer 0 contains either the bitmap or a flat representation of all vector layers $bp->readImage($tmpPath . '[0]'); + // Fix orientation from EXIF + $bp->autoOrient(); + $bp->setImageFormat('jpg'); $bp = $this->resize($bp, $maxX, $maxY);