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
Closed

Comments

@tdesvenain
Copy link
Contributor

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
Copy link
Contributor Author

quoted code is PsdImagePlugin.py l 184

@aclark4life
Copy link
Member

Please do submit a pull request!

@tdesvenain
Copy link
Contributor Author

this was the pull request you have accepted. thanks !

wiredfool pushed a commit that referenced this issue May 24, 2014
Fix tests so image2 is resized and thumbnailed
wiredfool added a commit that referenced this issue Sep 20, 2015
@soorajsasi
Copy link

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

hugovk pushed a commit that referenced this issue Mar 15, 2019
Added PNM to the list of PPM files
hugovk pushed a commit that referenced this issue Oct 14, 2020
Co-authored-by: nulano <nulano@nulano.eu>
hugovk pushed a commit that referenced this issue May 12, 2022
Do not install NumPy on Python 3.11

So that's how I was supposed to resolve that merge conflict.  Thank you.
radarhere pushed a commit that referenced this issue Jun 26, 2022
Optimise palettes with more than 128 colors
radarhere pushed a commit that referenced this issue Oct 11, 2022
Restored unimplemented DXGI format test
radarhere pushed a commit that referenced this issue Dec 7, 2022
Free comment when returning early
hugovk pushed a commit that referenced this issue May 24, 2023
radarhere pushed a commit that referenced this issue Sep 28, 2023
pre-commit autoupdate --freeze
radarhere pushed a commit that referenced this issue Feb 5, 2024
GerHobbelt pushed a commit to GerHobbelt/Pillow that referenced this issue Mar 18, 2024
hammockhippie pushed a commit to hammockhippie/Pillow that referenced this issue May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants