Pillow icon indicating copy to clipboard operation
Pillow copied to clipboard

PSD layer co-ordinates may be negative

Open radarhere opened this issue 1 year ago • 0 comments

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. https://github.com/python-pillow/Pillow/blob/d7874e8a03dbf57b01c0fe41290603ddfe2875c1/src/PIL/PsdImagePlugin.py#L179-L181

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.

radarhere avatar Jan 10 '24 07:01 radarhere