Closed nedpals closed 2 years ago
If it is not a security problem, can you attach the PSD file that caused the problem?
@dlehdanakf Sure thing: https://we.tl/t-G2lVvra3Uj
There are two files in that zip: test.psd and test2.psd
Here's test.psd
Here's test2.psd . This is just a modified version of test.psd that is parseable by the package.
What I found when scrutinizing the test.psd file is that when I delete the gradient layer, the library has managed to parse it successfully.
Hope it helps 😃
Thank you. It appears that the gradient fill layer does not contain any image data--I assume that Photoshop synthesizes the image on the fly when I open the PSD file--and we weren't prepared for such an edge case.
I'm pushing a fix that renders the layer as an empty 1x1 image. It's not ideal, but synthesizing the gradient fill is currently beyond our goals.
@pastelmind No worries! Atleast it doesn't throw an error now 😄 Great job btw
I think there might be a regression of this fix readLayerRecordsAndChannels.ts. readLayerRecordsAndChannels is failing with a RangeError again and it looks like the code may not longer account for this case. Unfortunately I do not have access to photoshop to further debug this issue. Let me know and I can send you a reproduction, but I can't post publically.
I'm trying to open a PSD file i haved created from Photopea into the demo and after selecting the file, the preview did not worked and instead the demo threw an error:
When dissecting the stack trace, it leads me to this code which is in line
253254:Hope it helps :wink: hoping to use it for a project