Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Can't identify some psd files because of layer mode type number #3

Closed
tdesvenain opened this Issue · 3 comments

2 participants

@tdesvenain

On many psd i have tested, we have a layerinfo which layer image mode is 3

but code supports now mode type 65535, 0, 1 and 2

    for i in range(i16(read(2))):
        type = i16(read(2))
        if type == 65535:
            m = "A"
        else:
            m = "RGB"[type]

so we finally get a "can't identify image file..." exception

we supposed that mode 3 is "A", so if we write :

    for i in range(i16(read(2))):
        type = i16(read(2))
        if type == 65535:
            m = "A"
        else:
            m = "RGBA"[type]

and then it works very fine

i'll submit a pull request

@tdesvenain

quoted code is PsdImagePlugin.py l 184

@aclark4life
Owner

Please do submit a pull request!

@tdesvenain

this was the pull request you have accepted. thanks !

@tdesvenain tdesvenain closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.