From 3ab378c316f6821fbdf70aa154a604d9b3ce82d5 Mon Sep 17 00:00:00 2001 From: AIC BV <89913092+AIC-BV@users.noreply.github.com> Date: Thu, 12 Oct 2023 09:48:06 +0200 Subject: [PATCH] Set correct quality parameter --- src/Database/Attach/Resizer.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Database/Attach/Resizer.php b/src/Database/Attach/Resizer.php index 3851c10c1..68f43c0d3 100644 --- a/src/Database/Attach/Resizer.php +++ b/src/Database/Attach/Resizer.php @@ -10,16 +10,19 @@ * Usage: * Resizer::open(mixed $file) * ->resize(int $width , int $height, string 'exact, portrait, landscape, auto, fit or crop') - * ->save(string 'path/to/file.jpg', int $quality); + * ->setOptions(['quality' => int $quality]) + * ->save(string 'path/to/file.jpg'); * * // Resize and save an image. * Resizer::open(Input::file('field_name')) * ->resize(800, 600, 'crop') - * ->save('path/to/file.jpg', 100); + * ->setOptions(['quality' => 100]) + * ->save('path/to/file.jpg'); * * // Recompress an image. * Resizer::open('path/to/image.jpg') - * ->save('path/to/new_image.jpg', 60); + * ->setOptions(['quality' => 60]) + * ->save('path/to/new_image.jpg'); * * @author Alexey Bobkov, Samuel Georges */