mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 08:14:10 +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.
|
||||
self.icclist.append(s)
|
||||
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
|
||||
offset = 14
|
||||
photoshop = {}
|
||||
photoshop = self.info.setdefault("photoshop", {})
|
||||
while s[offset : offset + 4] == b"8BIM":
|
||||
try:
|
||||
offset += 4
|
||||
|
@ -133,7 +131,6 @@ def APP(self, marker):
|
|||
offset += offset & 1 # align
|
||||
except struct.error:
|
||||
break # no sufficient data
|
||||
self.info["photoshop"] = photoshop
|
||||
|
||||
elif marker == 0xFFEE and s[:5] == b"Adobe":
|
||||
self.info["adobe"] = i16(s, 5)
|
||||
|
|
Loading…
Reference in New Issue
Block a user