mirror of
https://github.com/Intervention/image.git
synced 2025-08-15 10:23:59 +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(),
|
'gif' => new GifEncoder(),
|
||||||
'png' => new PngEncoder(),
|
'png' => new PngEncoder(),
|
||||||
'tiff', 'tif' => new TiffEncoder($this->quality),
|
'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 . ').'),
|
default => throw new EncoderException('No encoder found for file extension (' . $extension . ').'),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -51,6 +51,7 @@ class MediaTypeEncoder implements EncoderInterface
|
|||||||
'image/gif' => new GifEncoder(),
|
'image/gif' => new GifEncoder(),
|
||||||
'image/png' => new PngEncoder(),
|
'image/png' => new PngEncoder(),
|
||||||
'image/tiff' => new TiffEncoder($this->quality),
|
'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 . ').'),
|
default => throw new EncoderException('No encoder found for media type (' . $type . ').'),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user