Change to new module

This commit is contained in:
Antonio J. Delgado 2021-09-06 22:06:03 +03:00
parent d0a23fed53
commit 460becbb64

View file

@ -69,9 +69,7 @@ class image_classifier:
if people: if people:
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))
with open(file, 'br') as image_file: self.metadata = pyexiv2.ImageMetadata(file)
content = image_file.read()
self.metadata = pyexiv2.ImageData(content)
self.metadata.read() self.metadata.read()
print(f"IPTC keys: {self.metadata.iptc_keys}") print(f"IPTC keys: {self.metadata.iptc_keys}")
print(f"EXIF keys: {self.metadata.exif_keys}") print(f"EXIF keys: {self.metadata.exif_keys}")