Skip to content

Commit

Permalink
Added logging to fixIFD()
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 25, 2024
1 parent 4304414 commit 7dcf4d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/PIL/TiffImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2202,6 +2202,12 @@ def fixIFD(self) -> None:
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)
Expand Down

0 comments on commit 7dcf4d8

Please sign in to comment.