summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-02-08 11:30:35 +0100
committerSimon L <szaimen@e.mail.de>2023-02-08 11:30:35 +0100
commit7acda5fab6dab02b14e9b4094d330b71a176f437 (patch)
tree70ba224a17e8c9b0d7d96482114f48e4b114df3a
parentcadbccd7c72036c503b9376f3615ddacc9b77f08 (diff)
downloadnextcloud-server-7acda5fab6dab02b14e9b4094d330b71a176f437.tar.gz
nextcloud-server-7acda5fab6dab02b14e9b4094d330b71a176f437.zip
fix the backport
Signed-off-by: Simon L <szaimen@e.mail.de>
-rw-r--r--lib/private/Preview/Imaginary.php28
1 files changed, 16 insertions, 12 deletions
diff --git a/lib/private/Preview/Imaginary.php b/lib/private/Preview/Imaginary.php
index 884122ef54a..5d559b65f00 100644
--- a/lib/private/Preview/Imaginary.php
+++ b/lib/private/Preview/Imaginary.php
@@ -97,18 +97,22 @@ class Imaginary extends ProviderV2 {
$mimeType = 'jpeg';
}
- $operations = [
- [
- 'operation' => 'autorotate',
- ],
- [
- 'operation' => ($crop ? 'smartcrop' : 'fit'),
- 'params' => [
- 'width' => $maxX,
- 'height' => $maxY,
- 'stripmeta' => 'true',
- 'type' => $mimeType,
- 'norotation' => 'true',
+ if ($convert) {
+ $operations = [
+ [
+ 'operation' => 'convert',
+ 'params' => [
+ 'type' => 'png',
+ ]
+ ],
+ [
+ 'operation' => ($crop ? 'smartcrop' : 'fit'),
+ 'params' => [
+ 'width' => $maxX,
+ 'height' => $maxY,
+ 'type' => 'png',
+ 'norotation' => 'true',
+ ]
]
];
} else {