Change to set
This commit is contained in:
parent
cb4ca96251
commit
b27387cc64
1 changed files with 1 additions and 2 deletions
|
@ -78,7 +78,6 @@ class image_classifier:
|
||||||
sys.stdout.write(self.exif_info[key])
|
sys.stdout.write(self.exif_info[key])
|
||||||
else:
|
else:
|
||||||
self._log.debug("No exif info in the image.")
|
self._log.debug("No exif info in the image.")
|
||||||
self.exif_info['APP1'] = ''
|
|
||||||
self.append_people_to_exif(people)
|
self.append_people_to_exif(people)
|
||||||
with open(file, 'wb') as new_image_file:
|
with open(file, 'wb') as new_image_file:
|
||||||
new_image_file.write(self.exif_info.get_file())
|
new_image_file.write(self.exif_info.get_file())
|
||||||
|
@ -99,7 +98,7 @@ class image_classifier:
|
||||||
data['PeopleDetected'] = list()
|
data['PeopleDetected'] = list()
|
||||||
for person in people:
|
for person in people:
|
||||||
data['PeopleDetected'].append(person)
|
data['PeopleDetected'].append(person)
|
||||||
self.exif_info["user_comment"] = json.dumps(data)
|
self.exif_info.set("user_comment", json.dumps(data))
|
||||||
|
|
||||||
def is_json(self, data):
|
def is_json(self, data):
|
||||||
result = json.loads(data)
|
result = json.loads(data)
|
||||||
|
|
Loading…
Reference in a new issue