Sometimes exif strings are null terminated, and python imagining library doesn't deal with that for us.
This commit is contained in:
parent
6f11e0526e
commit
836503156d
@ -146,7 +146,7 @@ class Photo(object):
|
|||||||
for tag, value in info.items():
|
for tag, value in info.items():
|
||||||
decoded = TAGS.get(tag, tag)
|
decoded = TAGS.get(tag, tag)
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
value = value.strip()
|
value = value.strip().partition("\x00")[0]
|
||||||
if isinstance(decoded, str) and decoded.startswith("DateTime"):
|
if isinstance(decoded, str) and decoded.startswith("DateTime"):
|
||||||
try:
|
try:
|
||||||
value = datetime.strptime(value, '%Y:%m:%d %H:%M:%S')
|
value = datetime.strptime(value, '%Y:%m:%d %H:%M:%S')
|
||||||
|
Loading…
Reference in New Issue
Block a user