mirror of
https://github.com/Intervention/image.git
synced 2025-01-17 04:08:14 +01:00
Add non-standard mime type image/x-heic
This commit is contained in:
parent
5451ff9f90
commit
6daaedf7ed
@ -30,6 +30,7 @@ enum MediaType: string
|
||||
case IMAGE_JPX = 'image/jpx';
|
||||
case IMAGE_JPM = 'image/jpm';
|
||||
case IMAGE_HEIC = 'image/heic';
|
||||
case IMAGE_X_HEIC = 'image/x-heic';
|
||||
case IMAGE_HEIF = 'image/heif';
|
||||
|
||||
/**
|
||||
@ -64,7 +65,8 @@ enum MediaType: string
|
||||
self::IMAGE_JPX,
|
||||
self::IMAGE_JPM => Format::JP2,
|
||||
self::IMAGE_HEIF,
|
||||
self::IMAGE_HEIC => Format::HEIC,
|
||||
self::IMAGE_HEIC,
|
||||
self::IMAGE_X_HEIC => Format::HEIC,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ final class FormatTest extends BaseTestCase
|
||||
$format = Format::HEIC;
|
||||
$mediaTypes = $format->mediaTypes();
|
||||
$this->assertIsArray($mediaTypes);
|
||||
$this->assertCount(2, $mediaTypes);
|
||||
$this->assertCount(3, $mediaTypes);
|
||||
}
|
||||
|
||||
public function testEncoderJpeg(): void
|
||||
|
@ -99,6 +99,9 @@ final class MediaTypeTest extends BaseTestCase
|
||||
$mime = MediaType::IMAGE_HEIC;
|
||||
$this->assertEquals(Format::HEIC, $mime->format());
|
||||
|
||||
$mime = MediaType::IMAGE_X_HEIC;
|
||||
$this->assertEquals(Format::HEIC, $mime->format());
|
||||
|
||||
$mime = MediaType::IMAGE_HEIF;
|
||||
$this->assertEquals(Format::HEIC, $mime->format());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user