Open tvdavies opened 6 months ago
PSD files do this weird thing where they skip saving layers if there's only single layer without any extra options on it. You can just create layer on your side from the composite image (psd.canvas
) if you need to have layers.
Thanks for the response. I should have added a bit more information in my original post and in hindsight should have included some content in the PSD file to better showcase the issue here.
I have added an additional layer and both layers now have content. After saving the file from Photoshop I still have the issue of no layers being read in. It is something about this particular file. It doesn't matter what changes I make in Photoshop, I can never read the layers in with ag-psd.
I'm also finding an issue with the composite image (see attached images). Using the same file with psd-tools I am able to retrieve the layers and composite image data.
Image output from ag-psd:
Image output (correct) from psd-tools from same source file:
This is the PSD file used: no_layers_read.psd.zip
Ok I see it now, there's a new section in the file that contains layer data, instead of where it should be usually, something must have been changed in latest Photoshop versions, I'll look into it.
Ok I found what the core problem is, right now there's no proper support for 16 and 32 bit channels in ag-psd library but it's not being reported as an error. I'll look into adding proper support for those formats.
Just published version 20.0.0
with support for reading 16bit depth documents.
The attached PSD contains a single empty layer. However, after reading the PSD children is undefined. Opening the file in Photoshop and adding removing layers, re-saving and attempting to parse achieves the same results - the layers are never returned.
single_layer_not_working.psd.zip