mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 09:26:16 +03:00
Corrected adobe_transform value
This commit is contained in:
parent
7a4bf3df0f
commit
4351c37fc4
|
@ -795,6 +795,13 @@ 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_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):
|
def test_icc_after_SOF(self):
|
||||||
with Image.open("Tests/images/icc-after-SOF.jpg") as im:
|
with Image.open("Tests/images/icc-after-SOF.jpg") as im:
|
||||||
assert im.info["icc_profile"] == b"profile"
|
assert im.info["icc_profile"] == b"profile"
|
||||||
|
|
|
@ -140,7 +140,7 @@ def APP(self, marker):
|
||||||
self.info["adobe"] = i16(s, 5)
|
self.info["adobe"] = i16(s, 5)
|
||||||
# extract Adobe custom properties
|
# extract Adobe custom properties
|
||||||
try:
|
try:
|
||||||
adobe_transform = s[1]
|
adobe_transform = s[11]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user