mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
truncate icclist instead of changing to None
This commit is contained in:
parent
d23df7227c
commit
f15e4a8e06
BIN
Tests/images/icc-after-SOF.jpg
Normal file
BIN
Tests/images/icc-after-SOF.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 212 B |
|
@ -689,6 +689,10 @@ class TestFileJpeg:
|
||||||
apps_13_lengths = [len(v) for k, v in im.applist if k == "APP13"]
|
apps_13_lengths = [len(v) for k, v in im.applist if k == "APP13"]
|
||||||
assert [65504, 24] == apps_13_lengths
|
assert [65504, 24] == apps_13_lengths
|
||||||
|
|
||||||
|
def test_icc_after_SOF(self):
|
||||||
|
with Image.open("Tests/images/icc-after-SOF.jpg") as im:
|
||||||
|
assert im.info["icc_profile"] == b"profile"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(not is_win32(), reason="Windows only")
|
@pytest.mark.skipif(not is_win32(), reason="Windows only")
|
||||||
@skip_unless_feature("jpg")
|
@skip_unless_feature("jpg")
|
||||||
|
|
|
@ -221,7 +221,7 @@ def SOF(self, marker):
|
||||||
else:
|
else:
|
||||||
icc_profile = None # wrong number of fragments
|
icc_profile = None # wrong number of fragments
|
||||||
self.info["icc_profile"] = icc_profile
|
self.info["icc_profile"] = icc_profile
|
||||||
self.icclist = None
|
self.icclist = []
|
||||||
|
|
||||||
for i in range(6, len(s), 3):
|
for i in range(6, len(s), 3):
|
||||||
t = s[i : i + 3]
|
t = s[i : i + 3]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user