Update src/PIL/TiffImagePlugin.py

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Tom Flanagan 2024-11-20 05:21:14 -08:00 committed by GitHub
parent 44cc0bebb8
commit 82dfbc35b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1374,7 +1374,7 @@ class TiffImageFile(ImageFile.ImageFile):
if not close_self_fp: if not close_self_fp:
self.fp.seek(0) self.fp.seek(0)
# Save and restore the file position, because libtiff will move it # Save and restore the file position, because libtiff will move it
# outside of the python runtime, and that will confuse # outside of the Python runtime, and that will confuse
# io.BufferedReader and possible others. # io.BufferedReader and possible others.
# NOTE: This must use os.lseek(), and not fp.tell()/fp.seek(), # NOTE: This must use os.lseek(), and not fp.tell()/fp.seek(),
# because the buffer read head already may not equal the actual # because the buffer read head already may not equal the actual