Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tdesvenain opened this issue Jul 28, 2012 · 4 comments

Comments

Projects
None yet
3 participants
@tdesvenain
Copy link
Contributor

commented Jul 28, 2012

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

This comment has been minimized.

Copy link
Contributor Author

commented Jul 28, 2012

quoted code is PsdImagePlugin.py l 184

@aclark4life

This comment has been minimized.

Copy link
Member

commented Sep 8, 2012

Please do submit a pull request!

@tdesvenain

This comment has been minimized.

Copy link
Contributor Author

commented Sep 21, 2012

this was the pull request you have accepted. thanks !

@tdesvenain tdesvenain closed this Sep 21, 2012

wiredfool pushed a commit that referenced this issue May 24, 2014

Merge pull request #3 from hugovk/patch-1
Fix tests so image2 is resized and thumbnailed

wiredfool added a commit that referenced this issue Sep 20, 2015

@soorajsasi

This comment has been minimized.

Copy link

commented Dec 10, 2015

hi,
how to convert psd file to xml file in python

hugovk pushed a commit that referenced this issue Mar 15, 2019

Merge pull request #3 from radarhere/mime-types
Added PNM to the list of PPM files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.