diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2022-11-03 16:11:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 16:11:03 +0100 |
commit | 2e83a21cd2b2d2a167f3368e087a11ac95e127a3 (patch) | |
tree | 0684759be109fdc051ea5f788915d0d1445db37c /lib | |
parent | 3b084e5fbcab6fea00685a81922635ec1428e8aa (diff) | |
parent | 48917e718e55bc4e72d2b5f928e68049c35652e5 (diff) | |
download | nextcloud-server-2e83a21cd2b2d2a167f3368e087a11ac95e127a3.tar.gz nextcloud-server-2e83a21cd2b2d2a167f3368e087a11ac95e127a3.zip |
Merge pull request #34678 from pulsejet/patch-jpeg
Interlace all output JPEG
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Image.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php index a212d639084..45584b7209a 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/legacy/OC_Image.php @@ -290,6 +290,8 @@ class OC_Image implements \OCP\IImage { $retVal = imagegif($this->resource, $filePath); break; case IMAGETYPE_JPEG: + /** @psalm-suppress InvalidScalarArgument */ + imageinterlace($this->resource, (PHP_VERSION_ID >= 80000 ? true : 1)); $retVal = imagejpeg($this->resource, $filePath, $this->getJpegQuality()); break; case IMAGETYPE_PNG: @@ -379,6 +381,8 @@ class OC_Image implements \OCP\IImage { $res = imagepng($this->resource); break; case "image/jpeg": + /** @psalm-suppress InvalidScalarArgument */ + imageinterlace($this->resource, (PHP_VERSION_ID >= 80000 ? true : 1)); $quality = $this->getJpegQuality(); if ($quality !== null) { $res = imagejpeg($this->resource, null, $quality); |