Skip to content
This repository

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

Closed
tdesvenain opened this Issue July 28, 2012 · 3 comments

2 participants

Thomas Desvenain Alex Clark ☺
Thomas Desvenain

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

Thomas Desvenain

quoted code is PsdImagePlugin.py l 184

Alex Clark ☺

Please do submit a pull request!

Thomas Desvenain tdesvenain closed this September 21, 2012
Thomas Desvenain

this was the pull request you have accepted. thanks !

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.