From: Vincent Vanwaelscappel Date: Mon, 5 Jun 2023 11:45:23 +0000 (+0200) Subject: wip #5991 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7568f280b073f2c6f881f4024c08c0d2c7ae67ee;p=fluidbook_processfarm.git wip #5991 @0.25 --- diff --git a/app/src/ProcessFile.php b/app/src/ProcessFile.php index 4f7ddcc..957798f 100644 --- a/app/src/ProcessFile.php +++ b/app/src/ProcessFile.php @@ -22,6 +22,8 @@ class ProcessFile extends \Fluidbook\Tools\Jobs\ProcessFile { protected $force = false; protected $mobileRatio = 1; protected $resolutionRatio = 1; + + protected $quality = 85; protected $filespath; protected $_job = null; @@ -35,7 +37,8 @@ class ProcessFile extends \Fluidbook\Tools\Jobs\ProcessFile { $this->setForce(!!$force); $this->setResolutionRatio($resolutionRatio); $this->setMobileRatio($mobileRatio); - parent::__construct($format, $resolution, $withGraphics, $withTexts, $version); + $this->setQuality($quality); + parent::__construct($format, $resolution, $quality, $withGraphics, $withTexts, $version); } /** @@ -143,4 +146,15 @@ class ProcessFile extends \Fluidbook\Tools\Jobs\ProcessFile { return $res; } + /** + * @return int + */ + public function getQuality(): int { + return $this->quality; + } + + public function setQuality(int $quality): void { + parent::setQuality(min(100, max(0, $quality))); // TODO: Change the autogenerated stub + } + } \ No newline at end of file