Corrected adobe_transform value

This commit is contained in:
Andrew Murray 2021-04-15 21:49:51 +10:00
parent 7a4bf3df0f
commit 4351c37fc4
2 changed files with 8 additions and 1 deletions

View File

@ -795,6 +795,13 @@ class TestFileJpeg:
apps_13_lengths = [len(v) for k, v in im.applist if k == "APP13"]
assert [65504, 24] == apps_13_lengths
def test_adobe_transform(self):
with Image.open("Tests/images/pil_sample_rgb.jpg") as im:
assert im.info["adobe_transform"] == 1
with Image.open("Tests/images/pil_sample_cmyk.jpg") as im:
assert im.info["adobe_transform"] == 2
def test_icc_after_SOF(self):
with Image.open("Tests/images/icc-after-SOF.jpg") as im:
assert im.info["icc_profile"] == b"profile"

View File

@ -140,7 +140,7 @@ def APP(self, marker):
self.info["adobe"] = i16(s, 5)
# extract Adobe custom properties
try:
adobe_transform = s[1]
adobe_transform = s[11]
except IndexError:
pass
else: