mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Test when "adobe_transform" is unable to be read
This commit is contained in:
parent
4351c37fc4
commit
6967f3519f
BIN
Tests/images/truncated_app14.jpg
Normal file
BIN
Tests/images/truncated_app14.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user