Resize PSD while Retaining Layers

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
azmtest77
Posts: 3
Joined: 2015-05-17T14:40:41-07:00
Authentication code: 6789

Resize PSD while Retaining Layers

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resize PSD while Retaining Layers

Post 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
azmtest77
Posts: 3
Joined: 2015-05-17T14:40:41-07:00
Authentication code: 6789

Re: Resize PSD while Retaining Layers

Post 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?"
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resize PSD while Retaining Layers

Post 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.
azmtest77
Posts: 3
Joined: 2015-05-17T14:40:41-07:00
Authentication code: 6789

Re: Resize PSD while Retaining Layers

Post by azmtest77 »

Thank you for your help in resolving this issue.
Post Reply