Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

radarhere
Copy link
Member

Resolves #7704

At the moment, Pillow reads the top left co-ordinates of a PSD layer as unsigned, meaning that they can't be negative.

# bounding box
y0 = i32(read(4))
x0 = i32(read(4))

However, the issue has found a PSD file where a layer does have a negative Y offset. This PR adjusts the reading of the co-ordinates to be signed, so that they can be negative.

I created a test file using GIMP.

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

Successfully merging this pull request may close these issues.

Image.open() fails with struct.error with Photoshop .psd files
2 participants