Skip to content

Commit feaf2ea

Browse files
kmilosradarhere
authored andcommitted
Add strip chopping test
1 parent fa66d15 commit feaf2ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Tests/test_file_libtiff.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,3 +976,10 @@ def test_save_multistrip(self, tmp_path):
976976
with Image.open(out) as im:
977977
# Assert that there are multiple strips
978978
assert len(im.tag_v2[STRIPOFFSETS]) > 1
979+
980+
def test_strip_chop(self):
981+
# Test if a single strip image is loaded as chopped
982+
TiffImagePlugin.READ_LIBTIFF = True
983+
with Image.open("Tests/images/hopper.iccprofile.tif") as im:
984+
assert len(im.tag_v2[STRIPOFFSETS]) > 1
985+
TiffImagePlugin.READ_LIBTIFF = False

0 commit comments

Comments
 (0)