Read file
This commit is contained in:
parent
e4116950ba
commit
15d000f614
1 changed files with 3 additions and 1 deletions
|
@ -69,7 +69,9 @@ class image_classifier:
|
|||
if people:
|
||||
self._log.debug(f"Found {len(people)} known people in the image.")
|
||||
self._log.debug(json.dumps(people, indent=2))
|
||||
self.metadata = pyexiv2.ImageData(file)
|
||||
with open(file, 'bw') as image_file:
|
||||
content = image_file.read()
|
||||
self.metadata = pyexiv2.ImageData(content)
|
||||
self.metadata.read()
|
||||
print(f"IPTC keys: {self.metadata.iptc_keys}")
|
||||
print(f"EXIF keys: {self.metadata.exif_keys}")
|
||||
|
|
Loading…
Reference in a new issue