mirror of
https://github.com/Intervention/image.git
synced 2025-08-13 17:34:04 +02:00
Add jpeg200 extensions & media types to encoders
This commit is contained in:
@@ -55,6 +55,7 @@ class FileExtensionEncoder extends AutoEncoder
|
||||
'gif' => new GifEncoder(),
|
||||
'png' => new PngEncoder(),
|
||||
'tiff', 'tif' => new TiffEncoder($this->quality),
|
||||
'jp2', 'j2k', 'jpf', 'jpm', 'jpg2', 'j2c', 'jpc', 'jpx' => new Jpeg2000Encoder($this->quality),
|
||||
default => throw new EncoderException('No encoder found for file extension (' . $extension . ').'),
|
||||
};
|
||||
}
|
||||
|
@@ -51,6 +51,7 @@ class MediaTypeEncoder implements EncoderInterface
|
||||
'image/gif' => new GifEncoder(),
|
||||
'image/png' => new PngEncoder(),
|
||||
'image/tiff' => new TiffEncoder($this->quality),
|
||||
'image/jp2', 'image/jpx', 'image/jpm' => new Jpeg2000Encoder($this->quality),
|
||||
default => throw new EncoderException('No encoder found for media type (' . $type . ').'),
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user