Compositing Layered Photoshop files

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
jmd1
Posts: 1
Joined: 2012-04-08T00:42:38-07:00
Authentication code: 8675308

Compositing Layered Photoshop files

Post by jmd1 »

I have a layered PS file with 50 layers. I want to do two things using IM and am not clear how to do this:
1. I want to separate and extract each layer and store them as separate layers. I want to create a thumbnail or preview of each layer. How do I extract each layer such that I can do #2 below?
2. I want to be able to take specific layers (e.g., 1, 3, 10, 25) and composite them into a blended picture as I would in PS (e.g., turn on layers 1, 3, 10, 25 and see the result). Can this be done in PS? If so what is the command?

Thanks for any assistance!
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Compositing Layered Photoshop files

Post by Bonzo »

I have some notes on PSD use with php which can be modified for comand line without to much effort: http://www.rubblewebs.co.uk/imagemagick/psd.php
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Compositing Layered Photoshop files

Post by fmw42 »

convert image.psd image_%20d.png

separate all the layers into individual images


convert image.psd[0,20,25-30,40] -background somecolor -flatten newimage

takes layer 0, 20, 25-30, 40 and flattens them against some background

or

convert image.psd[0,20,25-30,40] newimage.psd


see
http://www.imagemagick.org/script/comma ... kqtq9nte86
http://www.imagemagick.org/Usage/layers/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Compositing Layered Photoshop files

Post by anthony »

Unix shells may require to quotes around the [..] part, to prevent the shell interpreting that syntax.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
amit1411
Posts: 8
Joined: 2015-08-03T22:24:14-07:00
Authentication code: 1151

Re: Compositing Layered Photoshop files

Post by amit1411 »

Hi jmd,
Came across this question while trying to fix a similar issue. I also have multiple Photoshop layers which blend together to create the final output. Not ale to get through it. Just checking if you got solution to your problem and it would be great if you can share the same with me.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Compositing Layered Photoshop files

Post by fmw42 »

amit1411 wrote:Hi jmd,
Came across this question while trying to fix a similar issue. I also have multiple Photoshop layers which blend together to create the final output. Not ale to get through it. Just checking if you got solution to your problem and it would be great if you can share the same with me.
Please supply your exact command line that you are trying to use and what layers are involved. Also identify you IM version and platform. Generally it is not a good idea to post to an old topic. In the future, please start a new topic and provide all the information that I suggested you provide
Post Reply