1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
From 473903b70e1b269a6110242a9c098a10c18554e2 Mon Sep 17 00:00:00 2001
From: jvoisin <julien.voisin@dustri.org>
Date: Thu, 3 Apr 2025 15:58:27 +0200
Subject: [PATCH] Fix HEIC parsing with the latest exiftool
Bug-Debian: https://bugs.debian.org/1101130
Origin: https://0xacab.org/jvoisin/mat2/-/commit/473903b70e1b269a6110242a9c098a10c18554e2
---
tests/test_libmat2.py | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -526,7 +526,40 @@
'parser': images.HEICParser,
'meta': {},
'expected_meta': {
+ 'BlueMatrixColumn': '0.14305 0.06061 0.71393',
+ 'BlueTRC': '(Binary data 32 bytes, use -b option to extract)',
+ 'CMMFlags': 'Not Embedded, Independent',
+ 'ChromaticAdaptation': '1.04788 0.02292 -0.05022 0.02959 0.99048 -0.01707 -0.00925 0.01508 0.75168',
+ 'ChromaticityChannel1': '0.64 0.33002',
+ 'ChromaticityChannel2': '0.3 0.60001',
+ 'ChromaticityChannel3': '0.15001 0.06',
+ 'ChromaticityChannels': 3,
+ 'ChromaticityColorant': 'Unknown',
+ 'ColorSpaceData': 'RGB ',
+ 'ConnectionSpaceIlluminant': '0.9642 1 0.82491',
+ 'DeviceAttributes': 'Reflective, Glossy, Positive, Color',
+ 'DeviceManufacturer': '',
+ 'DeviceMfgDesc': 'GIMP',
+ 'DeviceModel': '',
+ 'DeviceModelDesc': 'sRGB',
'ExifByteOrder': 'Big-endian (Motorola, MM)',
+ 'GreenMatrixColumn': '0.38512 0.7169 0.09706',
+ 'GreenTRC': '(Binary data 32 bytes, use -b option to extract)',
+ 'MediaWhitePoint': '0.9642 1 0.82491',
+ 'PrimaryPlatform': 'Apple Computer Inc.',
+ 'ProfileCMMType': 'Little CMS',
+ 'ProfileClass': 'Display Device Profile',
+ 'ProfileConnectionSpace': 'XYZ ',
+ 'ProfileCopyright': 'Public Domain',
+ 'ProfileCreator': 'Little CMS',
+ 'ProfileDateTime': '2022:05:15 16:29:22',
+ 'ProfileDescription': 'GIMP built-in sRGB',
+ 'ProfileFileSignature': 'acsp',
+ 'ProfileID': 0,
+ 'ProfileVersion': '4.3.0',
+ 'RedMatrixColumn': '0.43604 0.22249 0.01392',
+ 'RedTRC': '(Binary data 32 bytes, use -b option to extract)',
+ 'RenderingIntent': 'Perceptual',
'Warning': 'Bad IFD0 directory',
},
}
@@ -563,13 +596,13 @@
meta = p2.get_meta()
if meta:
for k, v in p2.get_meta().items():
- self.assertIn(k, case['expected_meta'], '"%s" is not in "%s" (%s)' % (k, case['expected_meta'], case['name']))
+ self.assertIn(k, case['expected_meta'], '"%s" is not in "%s" (%s), with all of them being %s' % (k, case['expected_meta'], case['name'], p2.get_meta().items()))
if str(case['expected_meta'][k]) in str(v):
continue
if 'extra_expected_meta' in case and k in case['extra_expected_meta']:
if str(case['extra_expected_meta'][k]) in str(v):
continue
- self.assertTrue(False, "got a different value (%s) than excepted (%s) for %s" % (str(v), meta, k))
+ self.assertTrue(False, "got a different value (%s) than excepted (%s) for %s, with all of them being %s" % (str(v), meta, k, p2.get_meta().items()))
self.assertTrue(p2.remove_all())
os.remove(target)
|