Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion piexif/_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ def convert_value(self, val):
if length > 4:
pointer = struct.unpack(self.endian_mark + "L", value)[0]
data = self.tiftag[pointer: pointer+length - 1]
elif length == 1:
data = value[0:length]
else:
data = value[0: length - 1]
elif t == TYPES.Short: # SHORT
Expand Down Expand Up @@ -267,4 +269,4 @@ def _get_key_name_dict(exif_dict):
"Interop":{TAGS["Interop"][n]["name"]:value for n, value in exif_dict["Interop"].items()},
"thumbnail":exif_dict["thumbnail"],
}
return new_dict
return new_dict