mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 16:22:22 +03:00
update dict instead of ignoring
This commit is contained in:
parent
f55eb73934
commit
dcd0cd9129
|
@ -101,11 +101,9 @@ def APP(self, marker):
|
||||||
# markers appear in the correct sequence.
|
# markers appear in the correct sequence.
|
||||||
self.icclist.append(s)
|
self.icclist.append(s)
|
||||||
elif marker == 0xFFED and s[:14] == b"Photoshop 3.0\x00":
|
elif marker == 0xFFED and s[:14] == b"Photoshop 3.0\x00":
|
||||||
# Process this marker only if previous were empty
|
|
||||||
if not self.info.get("photoshop"):
|
|
||||||
# parse the image resource block
|
# parse the image resource block
|
||||||
offset = 14
|
offset = 14
|
||||||
photoshop = {}
|
photoshop = self.info.setdefault("photoshop", {})
|
||||||
while s[offset : offset + 4] == b"8BIM":
|
while s[offset : offset + 4] == b"8BIM":
|
||||||
try:
|
try:
|
||||||
offset += 4
|
offset += 4
|
||||||
|
@ -133,7 +131,6 @@ def APP(self, marker):
|
||||||
offset += offset & 1 # align
|
offset += offset & 1 # align
|
||||||
except struct.error:
|
except struct.error:
|
||||||
break # no sufficient data
|
break # no sufficient data
|
||||||
self.info["photoshop"] = photoshop
|
|
||||||
|
|
||||||
elif marker == 0xFFEE and s[:5] == b"Adobe":
|
elif marker == 0xFFEE and s[:5] == b"Adobe":
|
||||||
self.info["adobe"] = i16(s, 5)
|
self.info["adobe"] = i16(s, 5)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user