From 704367f91eebe6158399f930f725334db96de134 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 15 May 2022 18:57:27 +0200 Subject: Add support for HEIC files Thanks to Maxime Morin ( https://www.maijin.fr/ ) for the patch. --- tests/data/dirty.heic | Bin 0 -> 1322449 bytes tests/test_libmat2.py | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/data/dirty.heic (limited to 'tests') diff --git a/tests/data/dirty.heic b/tests/data/dirty.heic new file mode 100644 index 0000000..0dc531d Binary files /dev/null and b/tests/data/dirty.heic differ diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index 9e56969..b32005f 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py @@ -251,6 +251,12 @@ class TestGetMeta(unittest.TestCase): meta = p.get_meta() self.assertEqual(meta['Name'], 'I am so') + def test_heic(self): + p = images.HEICParser('./tests/data/dirty.heic') + meta = p.get_meta() + self.assertEqual(meta['ProfileCopyright'], 'Public Domain') + self.assertEqual(meta['ProfileDescription'], 'GIMP built-in sRGB') + class TestRemovingThumbnails(unittest.TestCase): def test_odt(self): @@ -504,6 +510,11 @@ class TestCleaning(unittest.TestCase): 'EncodingSettings': 'Lavf52.103.0', }, 'expected_meta': {}, + },{ + 'name': 'heic', + 'parser': images.HEICParser, + 'meta': {}, + 'expected_meta': {}, } ] -- cgit v1.3