Test when "adobe_transform" is unable to be read

This commit is contained in:
Andrew Murray 2021-04-20 20:53:50 +10:00
parent 4351c37fc4
commit 6967f3519f
2 changed files with 7 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -802,6 +802,13 @@ class TestFileJpeg:
with Image.open("Tests/images/pil_sample_cmyk.jpg") as im:
assert im.info["adobe_transform"] == 2
# This image has been manually hexedited
# so that the APP14 reports its length to be 11,
# leaving no room for "adobe_transform"
with Image.open("Tests/images/truncated_app14.jpg") as im:
assert "adobe" in im.info
assert "adobe_transform" not in im.info
def test_icc_after_SOF(self):
with Image.open("Tests/images/icc-after-SOF.jpg") as im:
assert im.info["icc_profile"] == b"profile"