diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py index 9dccd8f031a..7f023d08e5c 100644 --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -920,20 +920,20 @@ def load(self, fp: IO[bytes]) -> None: if tag in self._tagdata: continue - tagname = TiffTags.lookup(tag, self.group).name - typname = TYPES.get(typ, "unknown") - msg = f"tag: {tagname} ({tag}) - type: {typname} ({typ})" + # tagname = TiffTags.lookup(tag, self.group).name + # typname = TYPES.get(typ, "unknown") + # msg = f"tag: {tagname} ({tag}) - type: {typname} ({typ})" try: unit_size, handler = self._load_dispatch[typ] except KeyError: - logger.debug("%s - unsupported type %s", msg, typ) + # logger.debug("%s - unsupported type %s", msg, typ) continue # ignore unsupported type size = count * unit_size if size > (8 if self._bigtiff else 4): here = fp.tell() (offset,) = self._unpack("Q" if self._bigtiff else "L", data) - msg += f" Tag Location: {here} - Data Location: {offset}" + # msg += f" Tag Location: {here} - Data Location: {offset}" if offset >= 2**63: warnings.warn("Tag offset too large") continue @@ -956,20 +956,20 @@ def load(self, fp: IO[bytes]) -> None: f"Expecting to read {size} bytes but only got {len(data)}." f" Skipping tag {tag}" ) - logger.debug(msg) + # logger.debug(msg) continue if not data: - logger.debug(msg) + # logger.debug(msg) continue self._tagdata[tag] = data self.tagtype[tag] = typ - msg += " - value: " - msg += f"" if size > 32 else repr(data) + # msg += " - value: " + # msg += f"" if size > 32 else repr(data) - logger.debug(msg) + # logger.debug(msg) (self.next,) = ( self._unpack("Q", self._ensure_read(fp, 8))