mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-29 18:54:16 +03:00
Test for libtiff, n_frames and seek.
This commit is contained in:
parent
b69b70198f
commit
5bdf1e4998
|
@ -401,6 +401,19 @@ class TestFileLibTiff(LibTiffTestCase):
|
||||||
|
|
||||||
TiffImagePlugin.READ_LIBTIFF = False
|
TiffImagePlugin.READ_LIBTIFF = False
|
||||||
|
|
||||||
|
def test_multipage_nframes(self):
|
||||||
|
# issue #862
|
||||||
|
TiffImagePlugin.READ_LIBTIFF = True
|
||||||
|
im = Image.open('Tests/images/multipage.tiff')
|
||||||
|
frames = im.n_frames
|
||||||
|
self.assertEqual(frames, 3)
|
||||||
|
for idx in range(frames):
|
||||||
|
im.seek(0)
|
||||||
|
# Should not raise ValueError: I/O operation on closed file
|
||||||
|
im.load()
|
||||||
|
|
||||||
|
TiffImagePlugin.READ_LIBTIFF = False
|
||||||
|
|
||||||
def test__next(self):
|
def test__next(self):
|
||||||
TiffImagePlugin.READ_LIBTIFF = True
|
TiffImagePlugin.READ_LIBTIFF = True
|
||||||
im = Image.open('Tests/images/hopper.tif')
|
im = Image.open('Tests/images/hopper.tif')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user