From ea6668a45e28b75cb4eeed9d220bc84c636c261f Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sat, 28 Dec 2024 18:00:04 +0100 Subject: [PATCH] Include alternative Jpeg 2000 magic byte signature --- tests/BaseTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/BaseTestCase.php b/tests/BaseTestCase.php index 045da48..01fb394 100644 --- a/tests/BaseTestCase.php +++ b/tests/BaseTestCase.php @@ -135,7 +135,7 @@ protected function assertMediaTypeJpeg2000(string|EncodedImage $input): void $sample = strtoupper(substr(bin2hex((string) $input), 0, 1024)); $this->assertTrue( - preg_match("/^0000000C6A5020200D0A870A/", $sample) === 1, + preg_match("/^0000000C6A5020200D0A870A|FF4FFF51/", $sample) === 1, 'Detected MIME type does not belong to the Jpeg 2000 format (' . substr($sample, 0, 24) . ').' ); }