mirror of
https://github.com/Intervention/image.git
synced 2025-01-16 19:58:14 +01:00
Add 'image/x-jp2-codestream' as Jpeg2000 mime type
This commit is contained in:
parent
8e12c2e152
commit
c66fa7dac8
@ -27,6 +27,7 @@ enum MediaType: string
|
||||
case IMAGE_X_XBITMAP = 'image/x-xbitmap';
|
||||
case IMAGE_TIFF = 'image/tiff';
|
||||
case IMAGE_JP2 = 'image/jp2';
|
||||
case IMAGE_X_JP2_CODESTREAM = 'image/x-jp2-codestream';
|
||||
case IMAGE_JPX = 'image/jpx';
|
||||
case IMAGE_JPM = 'image/jpm';
|
||||
case IMAGE_HEIC = 'image/heic';
|
||||
@ -63,6 +64,7 @@ enum MediaType: string
|
||||
self::IMAGE_TIFF => Format::TIFF,
|
||||
self::IMAGE_JP2,
|
||||
self::IMAGE_JPX,
|
||||
self::IMAGE_X_JP2_CODESTREAM,
|
||||
self::IMAGE_JPM => Format::JP2,
|
||||
self::IMAGE_HEIF,
|
||||
self::IMAGE_HEIC,
|
||||
|
@ -104,7 +104,7 @@ final class FileExtensionTest extends BaseTestCase
|
||||
yield [FileExtension::BMP, 8, MediaType::IMAGE_BMP];
|
||||
yield [FileExtension::TIFF, 1, MediaType::IMAGE_TIFF];
|
||||
yield [FileExtension::TIF, 1, MediaType::IMAGE_TIFF];
|
||||
yield [FileExtension::JP2, 3, MediaType::IMAGE_JP2];
|
||||
yield [FileExtension::JP2, 4, MediaType::IMAGE_JP2];
|
||||
yield [FileExtension::HEIC, 3, MediaType::IMAGE_HEIC];
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ final class FormatTest extends BaseTestCase
|
||||
$format = Format::JP2;
|
||||
$mediaTypes = $format->mediaTypes();
|
||||
$this->assertIsArray($mediaTypes);
|
||||
$this->assertCount(3, $mediaTypes);
|
||||
$this->assertCount(4, $mediaTypes);
|
||||
|
||||
$this->assertEquals(MediaType::IMAGE_JP2, $format->mediaType());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user