Skip to content

Commit

Permalink
Add strip chopping test
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilos authored and radarhere committed Jun 30, 2021
1 parent fa66d15 commit feaf2ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tests/test_file_libtiff.py
Expand Up @@ -976,3 +976,10 @@ def test_save_multistrip(self, tmp_path):
with Image.open(out) as im:
# Assert that there are multiple strips
assert len(im.tag_v2[STRIPOFFSETS]) > 1

def test_strip_chop(self):
# Test if a single strip image is loaded as chopped
TiffImagePlugin.READ_LIBTIFF = True
with Image.open("Tests/images/hopper.iccprofile.tif") as im:
assert len(im.tag_v2[STRIPOFFSETS]) > 1
TiffImagePlugin.READ_LIBTIFF = False

0 comments on commit feaf2ea

Please sign in to comment.