mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 13:40:54 +03:00
Support writing LONG8 offsets
This commit is contained in:
parent
0a99d63028
commit
24e9961c4f
|
@ -108,10 +108,6 @@ class TestFileTiff:
|
|||
assert_image_equal_tofile(im, "Tests/images/hopper.tif")
|
||||
|
||||
with Image.open("Tests/images/hopper_bigtiff.tif") as im:
|
||||
# The data type of this file's StripOffsets tag is LONG8,
|
||||
# which is not yet supported for offset data when saving multiple frames.
|
||||
del im.tag_v2[273]
|
||||
|
||||
outfile = str(tmp_path / "temp.tif")
|
||||
im.save(outfile, save_all=True, append_images=[im], tiffinfo=im.tag_v2)
|
||||
|
||||
|
|
|
@ -2123,7 +2123,7 @@ class AppendingTiffWriter(io.BytesIO):
|
|||
|
||||
def _fmt(self, field_size: int) -> str:
|
||||
try:
|
||||
return {2: "H", 4: "L"}[field_size]
|
||||
return {2: "H", 4: "L", 8: "Q"}[field_size]
|
||||
except KeyError:
|
||||
msg = "offset is not supported"
|
||||
raise RuntimeError(msg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user