PSD layer co-ordinates may be negative by radarhere · Pull Request #7706 · python-pillow/Pillow
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.
Pillow/src/PIL/PsdImagePlugin.py
Lines 179 to 181 in d7874e8
| # 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.