Quality
quality
Used for specifying the quality of the image output. Can be specified not only be value, but algorithm (or program) as well.
When providing different algorithms, you need to calculate the CU costs as well.
Aliases
q
Parameters
- 0-100: lowest - highest quality, or lossless media formats - provides the depth of the algorithm (fast - slower)
jpegoptim
: Jpegoptim JPEG optimization procedurejpegoptim:
+ 0-100: jpeg optimization quality (0: weakest, 100 best quality)
optipng
: OptiPNG PNG optimization procedure
Limitations
- the compressing algorithm / program specifies the output image format, so a JPEG optimization yields JPEG output as well, regardless whether you wanted a PNG or not
Dependencies
- This transformation does not have any dependencies.
Examples
4.9KiB
w:200
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(200);
4.0KiB
w:200_q:30
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(200)->quality(30);
15.2KiB
w:400
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(400);
9.8KiB
w:400_q:40
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(400)->quality(40);
7.8KiB
w:400_q:jpegoptim:40
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(400)->jpegoptim(40);