Added logging to fixIFD()

This commit is contained in:
Andrew Murray 2024-11-25 16:43:21 +11:00
parent 4304414473
commit 7dcf4d8ab3

View File

@ -2202,6 +2202,12 @@ class AppendingTiffWriter(io.BytesIO):
if tag in self.Tags:
cur_pos = self.f.tell()
tagname = TiffTags.lookup(tag).name
typname = TYPES.get(field_type, "unknown")
msg = f"fixIFD: {tagname} ({tag}) - type: {typname} ({field_type})"
msg += f"- type size: {field_size} - count: {count}"
logger.debug(msg)
if is_local:
self._fixOffsets(count, field_size)
self.f.seek(cur_pos + 4)