Skip to content

Commit 7dcf4d8

Browse files
committed
Added logging to fixIFD()
1 parent 4304414 commit 7dcf4d8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PIL/TiffImagePlugin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,12 @@ def fixIFD(self) -> None:
22022202
if tag in self.Tags:
22032203
cur_pos = self.f.tell()
22042204

2205+
tagname = TiffTags.lookup(tag).name
2206+
typname = TYPES.get(field_type, "unknown")
2207+
msg = f"fixIFD: {tagname} ({tag}) - type: {typname} ({field_type})"
2208+
msg += f"- type size: {field_size} - count: {count}"
2209+
logger.debug(msg)
2210+
22052211
if is_local:
22062212
self._fixOffsets(count, field_size)
22072213
self.f.seek(cur_pos + 4)

0 commit comments

Comments
 (0)