Closed gyk closed 1 year ago
Thanks!
We'll need a test case that has a minimal PSD file where
The test can live somewhere in here https://github.com/chinedufn/psd/tree/master/tests
After that we can get this merged.
I've added a 1x1 PSD that
Thanks for getting this all tested!
I encountered a PSD file that caused
psd
crate to panic. The problems are:read_pascal_string
seems to have a bug. Pascal string is padded to make the size even, so the extra byte only exists when data length + 1 (header byte) is odd. Related to #40. Ref implementation: https://github.com/ImageMagick/ImageMagick/blob/7.1.1-3/coders/psd.c#L798-L799This PR attempts to resolve above issues.
Update: Also fixes panicking when the Layer and mask information section is empty (Krita can produce such PSDs).