mirror of
https://github.com/Intervention/image.git
synced 2025-08-16 19:04:00 +02:00
Encode webp lossless with Imagick WebpEncoder and quality of 100
Matches behaviour of GD encoder.
This commit is contained in:
@@ -32,6 +32,10 @@ class WebpEncoder extends GenericWebpEncoder implements SpecializedInterface
|
||||
$imagick->setImageCompression($compression);
|
||||
$imagick->setImageCompressionQuality($this->quality);
|
||||
|
||||
if ($this->quality === 100) {
|
||||
$imagick->setOption('webp:lossless', 'true');
|
||||
}
|
||||
|
||||
return new EncodedImage($imagick->getImagesBlob(), 'image/webp');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user