summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_Image.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/legacy/OC_Image.php')
-rw-r--r--lib/private/legacy/OC_Image.php4
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);