Page 1 of 1

Resize PSD while Retaining Layers

Posted: 2015-05-17T14:48:31-07:00
by azmtest77
Hello All,

I am new to imagemagick and I need to resize a PSD file with multiple layers while also retaining the layers. I have tried resizing the file using the convert utility using the following command below and while I get the full image in the output it doesn't retain the multiple layers that were included in the input file.


# convert input.psd[0] -verbose -resize 2048x1536 output.psd


Thank you for your help in advance.

Re: Resize PSD while Retaining Layers

Posted: 2015-05-17T15:16:30-07:00
by fmw42
input.psd[0]


will retain only the flattened layers of the PSD.

try

Code: Select all

 convert input.psd -verbose -resize 2048x1536 output.psd

Re: Resize PSD while Retaining Layers

Posted: 2015-05-17T20:12:08-07:00
by azmtest77
Hello,

Thank you for your response. Yes, removing [0] helps retain the layers, however I am unable to open the output.psd file in Photoshop as I get an error saying "There was a problem reading the layer data. Read the composite data instead?"

Re: Resize PSD while Retaining Layers

Posted: 2015-05-17T20:43:07-07:00
by fmw42
try

Code: Select all

identify input.psd
find out how many layers, then skip the first. Or better just do

Code: Select all

convert input.psd[1--1] -verbose -resize 2048x1536 output.psd
That will skip the first, flattened layer, [0]

see the top of the page at http://www.imagemagick.org/Usage/basics/#list_ops about -1 layer as the last one.

Re: Resize PSD while Retaining Layers

Posted: 2015-05-18T06:37:45-07:00
by azmtest77
Thank you for your help in resolving this issue.