psd.js
psd.js copied to clipboard
Error when importing PSD with a text layer from Photopea
I'm getting an error when parsing a PSD that has a text layer saved from Photopea.
Github is not letting me attach a PSD.
Steps to reproduce:
- Open https://www.photopea.com/
- Create a A4 document
- Add a text layer to it
- Save as PSD
- Parse using
psd.tree().export();
The error:
[TypeError: Cannot set properties of undefined (setting 'undefined')
at updateNode (/node_modules/parse-engine-data/lib/parseEngineData.js:196:35)
at Object.parse (/node_modules/parse-engine-data/lib/parseEngineData.js:80:13)
at typeMatch (/node_modules/parse-engine-data/lib/parseEngineData.js:48:22)
at /node_modules/parse-engine-data/lib/parseEngineData.js:38:9
at Array.map (<anonymous>:null:null)
at textReg (/node_modules/parse-engine-data/lib/parseEngineData.js:37:13)
at paresr (/node_modules/parse-engine-data/lib/parseEngineData.js:22:5)
at TextElements.module.exports.TextElements.parse (/node_modules/psd/lib/psd/layer_info/typetool.coffee:37:19)
at LazyExecute.module.exports.LazyExecute.load (/node_modules/psd/lib/psd/lazy_execute.coffee:83:23)
at LazyExecute.get (/node_modules/psd/lib/psd/lazy_execute.coffee:66:12)
at Layer.module.exports.Layer.export [as export] (/node_modules/psd/lib/psd/nodes/layer.coffee:13:29)
at /node_modules/psd/lib/psd/nodes/root.coffee:33:37
at Array.map (<anonymous>:null:null)
at Root.module.exports.Root.export [as export] (/node_modules/psd/lib/psd/nodes/root.coffee:33:26)
If I remove the text layer in Photopea and resave to a new PSD, PSDjs parses and there is no error.
#122 you cant change text using this lib !
Hi I'm not editing the text with this library.
If I remove the text layer in Photopea and resave to a new PSD. Then when PSDjs parses there is no error ...meaning that the library does not like the Text layer.