Dump all exif
This commit is contained in:
parent
9a103ec965
commit
de4c5856d7
1 changed files with 2 additions and 2 deletions
|
@ -71,10 +71,10 @@ class image_classifier:
|
||||||
self._log.debug(f"Found {len(people)} known people in the image.")
|
self._log.debug(f"Found {len(people)} known people in the image.")
|
||||||
self._log.debug(json.dumps(people, indent=2))
|
self._log.debug(json.dumps(people, indent=2))
|
||||||
self.iptc_info = IPTCInfo(file, force=True)
|
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:
|
with open(file, 'rb') as image_file:
|
||||||
exif_info = exif.Image(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.append_people(people)
|
||||||
self.iptc_info.save()
|
self.iptc_info.save()
|
||||||
self._log.debug(f"Updated file '{file}'.")
|
self._log.debug(f"Updated file '{file}'.")
|
||||||
|
|
Loading…
Reference in a new issue