Add EXIF info again
This commit is contained in:
parent
9beade82bd
commit
9a103ec965
1 changed files with 4 additions and 1 deletions
|
@ -71,7 +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(self.iptc_info['keywords'])
|
print(f"IPTC info: {self.iptc_info['keywords']}")
|
||||||
|
with open(file, 'rb') as image_file:
|
||||||
|
exif_info = exif.Image(image_file)
|
||||||
|
print(f"EXIF info: {dir(exif_info)}")
|
||||||
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