Skip to content

Commit

Permalink
Merge pull request #7078 from radarhere/long8
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jun 13, 2023
2 parents 0c7061e + dd15f15 commit ae92195
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Tests/test_file_tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,17 @@ def test_mac_tiff(self):

assert_image_similar_tofile(im, "Tests/images/pil136.png", 1)

def test_bigtiff(self):
def test_bigtiff(self, tmp_path):
with Image.open("Tests/images/hopper_bigtiff.tif") as im:
assert_image_equal_tofile(im, "Tests/images/hopper.tif")

with Image.open("Tests/images/hopper_bigtiff.tif") as im:
# multistrip support not yet implemented
del im.tag_v2[273]

outfile = str(tmp_path / "temp.tif")
im.save(outfile, save_all=True, append_images=[im], tiffinfo=im.tag_v2)

def test_set_legacy_api(self):
ifd = TiffImagePlugin.ImageFileDirectory_v2()
with pytest.raises(Exception) as e:
Expand Down
4 changes: 4 additions & 0 deletions src/PIL/TiffImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1894,6 +1894,10 @@ class AppendingTiffWriter:
8, # srational
4, # float
8, # double
4, # ifd
2, # unicode
4, # complex
8, # long8
]

# StripOffsets = 273
Expand Down

0 comments on commit ae92195

Please sign in to comment.