Merge pull request #35203 from nextcloud/jpeg-80

Default Jpeg quality to 80
This commit is contained in:
John Molakvoæ 2022-11-17 08:41:34 +01:00 committed by GitHub
commit f021172eab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -415,7 +415,7 @@ class OC_Image implements \OCP\IImage {
* @return int|null
*/
protected function getJpegQuality() {
$quality = $this->config->getAppValue('preview', 'jpeg_quality', 90);
$quality = $this->config->getAppValue('preview', 'jpeg_quality', '80');
if ($quality !== null) {
$quality = min(100, max(10, (int) $quality));
}

View File

@ -140,7 +140,7 @@ class ImageTest extends \Test\TestCase {
$config = $this->createMock(IConfig::class);
$config->expects($this->once())
->method('getAppValue')
->with('preview', 'jpeg_quality', 90)
->with('preview', 'jpeg_quality', '80')
->willReturn(null);
$config->expects($this->once())
->method('getSystemValueInt')