mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
Merge pull request #3771 from radarhere/app13
Fixed reading APP13 marker without Photoshop data
This commit is contained in:
commit
0ccd887431
BIN
Tests/images/app13.jpg
Normal file
BIN
Tests/images/app13.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 563 B |
|
@ -620,6 +620,10 @@ class TestFileJpeg(PillowTestCase):
|
||||||
'DisplayedUnitsY': 1,
|
'DisplayedUnitsY': 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# This image does not contain a Photoshop header string
|
||||||
|
im = Image.open("Tests/images/app13.jpg")
|
||||||
|
self.assertNotIn("photoshop", im.info)
|
||||||
|
|
||||||
|
|
||||||
@unittest.skipUnless(sys.platform.startswith('win32'), "Windows only")
|
@unittest.skipUnless(sys.platform.startswith('win32'), "Windows only")
|
||||||
class TestFileCloseW32(PillowTestCase):
|
class TestFileCloseW32(PillowTestCase):
|
||||||
|
|
|
@ -136,7 +136,7 @@ def APP(self, marker):
|
||||||
offset = offset + size
|
offset = offset + size
|
||||||
if offset & 1:
|
if offset & 1:
|
||||||
offset += 1
|
offset += 1
|
||||||
self.info["photoshop"] = photoshop
|
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)
|
||||||
# extract Adobe custom properties
|
# extract Adobe custom properties
|
||||||
|
|
Loading…
Reference in New Issue
Block a user