Merge pull request #7483 from radarhere/psd

This commit is contained in:
Hugo van Kemenade 2023-12-21 12:50:34 +02:00 committed by GitHub
commit 7e30619541
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@ -111,6 +111,11 @@ def test_rgba():
assert_image_equal_tofile(im, "Tests/images/imagedraw_square.png")
def test_layer_skip():
with Image.open("Tests/images/five_channels.psd") as im:
assert im.n_frames == 1
def test_icc_profile():
with Image.open(test_file) as im:
assert "icc_profile" in im.info

View File

@ -186,6 +186,9 @@ def _layerinfo(fp, ct_bytes):
ct_types = i16(read(2))
types = list(range(ct_types))
if len(types) > 4:
fp.seek(len(types) * 6 + 12, io.SEEK_CUR)
size = i32(read(4))
fp.seek(size, io.SEEK_CUR)
continue
for _ in types: