Dump all exif

This commit is contained in:
Antonio J. Delgado 2021-09-06 21:36:21 +03:00
parent 9a103ec965
commit de4c5856d7

View file

@ -71,10 +71,10 @@ class image_classifier:
self._log.debug(f"Found {len(people)} known people in the image.")
self._log.debug(json.dumps(people, indent=2))
self.iptc_info = IPTCInfo(file, force=True)
print(f"IPTC info: {self.iptc_info['keywords']}")
print(f"IPTC info: {json.dumps(self.iptc_info['keywords'], indent=2)}")
with open(file, 'rb') as image_file:
exif_info = exif.Image(image_file)
print(f"EXIF info: {dir(exif_info)}")
print(f"EXIF info: {json.dumps(exif_info.get_all(), indent=2)}")
self.append_people(people)
self.iptc_info.save()
self._log.debug(f"Updated file '{file}'.")