mirror of
https://github.com/Intervention/image.git
synced 2025-08-19 04:01:30 +02:00
Add named quality parameter in FileExtensionEncoder
This commit is contained in:
@@ -49,14 +49,14 @@ class FileExtensionEncoder extends AutoEncoder
|
||||
}
|
||||
|
||||
return match (strtolower($extension)) {
|
||||
'webp' => new WebpEncoder($this->quality),
|
||||
'avif' => new AvifEncoder($this->quality),
|
||||
'jpeg', 'jpg' => new JpegEncoder($this->quality),
|
||||
'webp' => new WebpEncoder(quality: $this->quality),
|
||||
'avif' => new AvifEncoder(quality: $this->quality),
|
||||
'jpeg', 'jpg' => new JpegEncoder(quality: $this->quality),
|
||||
'bmp' => new BmpEncoder(),
|
||||
'gif' => new GifEncoder(),
|
||||
'png' => new PngEncoder(),
|
||||
'tiff', 'tif' => new TiffEncoder($this->quality),
|
||||
'jp2', 'j2k', 'jpf', 'jpm', 'jpg2', 'j2c', 'jpc', 'jpx' => new Jpeg2000Encoder($this->quality),
|
||||
'tiff', 'tif' => new TiffEncoder(quality: $this->quality),
|
||||
'jp2', 'j2k', 'jpf', 'jpm', 'jpg2', 'j2c', 'jpc', 'jpx' => new Jpeg2000Encoder(quality: $this->quality),
|
||||
default => throw new EncoderException('No encoder found for file extension (' . $extension . ').'),
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user