mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
fp.tell resyncs the python3 with the file pointer
This commit is contained in:
parent
d8b2829f4b
commit
17ac15543d
|
@ -661,6 +661,9 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
if Image.DEBUG:
|
if Image.DEBUG:
|
||||||
print("Seeking to frame %s, on frame %s, __next %s, location: %s"%
|
print("Seeking to frame %s, on frame %s, __next %s, location: %s"%
|
||||||
(frame, self.__frame, self.__next, self.fp.tell()))
|
(frame, self.__frame, self.__next, self.fp.tell()))
|
||||||
|
# reset python3 buffered io handle in case fp
|
||||||
|
# was passed to libtiff, invalidating the buffer
|
||||||
|
self.fp.tell()
|
||||||
self.fp.seek(self.__next)
|
self.fp.seek(self.__next)
|
||||||
if Image.DEBUG:
|
if Image.DEBUG:
|
||||||
print("Loading tags, location: %s"%self.fp.tell())
|
print("Loading tags, location: %s"%self.fp.tell())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user