$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:
$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);
$img = new \OC_Image(null, null, $config);
$img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.jpg');
$raw = imagecreatefromstring(file_get_contents(OC::$SERVERROOT.'/tests/data/testimage.jpg'));
+ /** @psalm-suppress InvalidScalarArgument */
+ imageinterlace($raw, (PHP_VERSION_ID >= 80000 ? true : 1));
ob_start();
imagejpeg($raw);
$expected = ob_get_clean();