mdboom / pytoshop

Library for reading and writing Photoshop PSD and PSB files
Other
119 stars 22 forks source link

Trying to create new psd from scratch #29

Open dhaneshwarsingh opened 4 years ago

dhaneshwarsingh commented 4 years ago

Description

I was trying to figure out how to create a new PSD from scratch with the dimensions and stuff I want but I am still unable to find out documentation for that. can you give me some idea where to start That would be very helpful!

mruijzendaal commented 3 years ago

The documentation is indeed absent for most of the code. What I ended up doing is making a template psd file (in my case of two white layers, one of which has a mask), reading that using psd: pytoshop.PsdFile = pytoshop.read(fd). I then modified the properties (layer sizes and contents) to my needs, and saved this psd file afterwards.

Not the prettiest by far, but this was the only workaround I could find.