chinedufn / psd

A Rust API for parsing and working with PSD files.
https://chinedufn.github.io/psd
Apache License 2.0
265 stars 40 forks source link

Fix reading pascal string #42

Closed gyk closed 1 year ago

gyk commented 1 year ago

I encountered a PSD file that caused psd crate to panic. The problems are:

This PR attempts to resolve above issues.

Update: Also fixes panicking when the Layer and mask information section is empty (Krita can produce such PSDs).

chinedufn commented 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.

gyk commented 1 year ago

I've added a 1x1 PSD that

chinedufn commented 1 year ago

Thanks for getting this all tested!