Export layers to individual psd file keeping guides

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
vincent.tschanz
Posts: 2
Joined: 2019-10-11T01:05:00-07:00
Authentication code: 1152

Export layers to individual psd file keeping guides

Post by vincent.tschanz » 2019-10-11T01:14:24-07:00

I have a huge PSB (large photoshop document format) containing hundred of layers and guides.

I use the following to export each layer to a png using the layer name as filename and keeping the document size :

Code: Select all

convert -dispose Background huge-file.psb -layers coalesce -set filename:layers %l %[filename:layers].png
Is there a way to export to individual psd files instead of png ? (if I specify .psd as output format, nothing is written) And keeping the guides present in the original file?

Thank you.

User avatar
fmw42
Posts: 25546
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Export layers to individual psd file keeping guides

Post by fmw42 » 2019-10-11T12:02:52-07:00

Your command works fine for me on IM 6.9.10.68 Q16 and IM 7.0.8.68 Mac OSX with a layered PSD file.

What is your Imagemagick version and platform/OS?

Perhaps your are running out of RAM or space in the /tmp directory? See https://imagemagick.org/Usage/files/#massive

vincent.tschanz
Posts: 2
Joined: 2019-10-11T01:05:00-07:00
Authentication code: 1152

Re: Export layers to individual psd file keeping guides

Post by vincent.tschanz » 2019-10-14T00:19:35-07:00

I'm using ImageMagick 7.0.8-68 on Macos 10.14.6
16GB RAM

I see no error message when I run

Code: Select all

convert -dispose Background file.psb -layers coalesce -set filename:layers %l %[filename:layers].psd
But nothing is written

The 'magick' process go up to 14GB, then stabilize at 12.2GB until the end.

Edit: I guess the memory is the problem. If I try with only one layer [1] I get a result, but the size is wrong, I get a quarter of the whole image. Maybe a compatibility issue with the latest Adobe CC format.

User avatar
fmw42
Posts: 25546
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Export layers to individual psd file keeping guides

Post by fmw42 » 2019-10-14T09:34:36-07:00

Perhaps you are running out of space in your tmp directory. Look to see if it is filled with images that did not get deleted, esp. those belonging to Imagemagick.

Post Reply